Version Description
= 8.1.08 =
- This version addresses various bug fixes, feature requests and security fixes.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 8.1.10.001 |
Comparing to | |
See all releases |
Code changes from version 8.1.09.008 to 8.1.10.001
- changelog.txt +5 -0
- wppa-admin-styles.css +5 -1
- wppa-admin.php +2 -3
- wppa-adminbar.php +2 -2
- wppa-album-admin-autosave.php +160 -102
- wppa-common-functions.php +4 -1
- wppa-edit-sequence.php +2 -2
- wppa-exif-iptc-common.php +89 -192
- wppa-featen-widget.php +15 -18
- wppa-gp-widget.php +10 -13
- wppa-help.php +17 -16
- wppa-init.php +4 -2
- wppa-lasten-widget.php +15 -21
- wppa-notify-widget.php +4 -5
- wppa-photo-admin-autosave.php +211 -166
- wppa-potd-widget.php +10 -8
- wppa-settings-autosave.php +6 -9
- wppa-slideshow-widget.php +17 -10
- wppa-utils.php +53 -8
- wppa-widget-functions.php +2 -2
- wppa-wrappers.php +6 -4
- wppa.php +2 -2
changelog.txt
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
= 8.1.09 =
|
4 |
|
5 |
* size="auto,500" i.e. responsive with maximum did not work as the maximum was not working. Fixed.
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 8.1.10 =
|
4 |
+
|
5 |
+
* Widgets do no longer give errors in the widget block editor.
|
6 |
+
* Improved layout of the album admin table page.
|
7 |
+
|
8 |
= 8.1.09 =
|
9 |
|
10 |
* size="auto,500" i.e. responsive with maximum did not work as the maximum was not working. Fixed.
|
wppa-admin-styles.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
-
* version 8.1.
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
@@ -542,3 +542,7 @@ border:1px solid black;
|
|
542 |
#wppaphoto-table tr, #wppaphoto-table th, #wppaphoto-table td {
|
543 |
padding: 2px; 0;
|
544 |
}
|
|
|
|
|
|
|
|
1 |
/* admin-styles.css
|
2 |
*
|
3 |
* wp-photo-album-plus
|
4 |
+
* version 8.1.10.001
|
5 |
*/
|
6 |
#files_list, #files_list2
|
7 |
{
|
542 |
#wppaphoto-table tr, #wppaphoto-table th, #wppaphoto-table td {
|
543 |
padding: 2px; 0;
|
544 |
}
|
545 |
+
|
546 |
+
.wppa-admin-button {
|
547 |
+
margin: 6px !important;
|
548 |
+
}
|
wppa-admin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -77,7 +77,7 @@ function wppa_add_admin() {
|
|
77 |
add_submenu_page( 'wppa_admin_menu', __('Edit tags', 'wp-photo-album-plus' ), __('Edit tags', 'wp-photo-album-plus' ), 'wppa_edit_tags', 'wppa_edit_tags', 'wppa_tag_editor' );
|
78 |
}
|
79 |
if ( wppa_switch( 'opt_menu_edit_sequence' ) ) {
|
80 |
-
add_submenu_page( 'wppa_admin_menu', __('Edit Photo Sequence', 'wp-photo-album-plus' ), __('Edit Photo
|
81 |
}
|
82 |
if ( wppa_switch( 'opt_menu_doc' ) ) {
|
83 |
add_submenu_page( 'wppa_admin_menu', __('Help & Info', 'wp-photo-album-plus' ), __('Documentation', 'wp-photo-album-plus' ), 'wppa_help', 'wppa_help', 'wppa_page_help' );
|
@@ -264,7 +264,6 @@ require_once 'wppa-privacy-policy.php';
|
|
264 |
require_once 'wppa-gutenberg-photo.php';
|
265 |
require_once 'wppa-gutenberg-wppa.php';
|
266 |
|
267 |
-
|
268 |
/* This is for the changelog text when an update is available */
|
269 |
global $pagenow;
|
270 |
if ( 'plugins.php' === $pagenow )
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
77 |
add_submenu_page( 'wppa_admin_menu', __('Edit tags', 'wp-photo-album-plus' ), __('Edit tags', 'wp-photo-album-plus' ), 'wppa_edit_tags', 'wppa_edit_tags', 'wppa_tag_editor' );
|
78 |
}
|
79 |
if ( wppa_switch( 'opt_menu_edit_sequence' ) ) {
|
80 |
+
add_submenu_page( 'wppa_admin_menu', __('Edit Photo Sequence', 'wp-photo-album-plus' ), __('Edit Photo Sequence', 'wp-photo-album-plus' ), 'wppa_edit_sequence', 'wppa_edit_sequence', 'wppa_edit_sequence' );
|
81 |
}
|
82 |
if ( wppa_switch( 'opt_menu_doc' ) ) {
|
83 |
add_submenu_page( 'wppa_admin_menu', __('Help & Info', 'wp-photo-album-plus' ), __('Documentation', 'wp-photo-album-plus' ), 'wppa_help', 'wppa_help', 'wppa_page_help' );
|
264 |
require_once 'wppa-gutenberg-photo.php';
|
265 |
require_once 'wppa-gutenberg-wppa.php';
|
266 |
|
|
|
267 |
/* This is for the changelog text when an update is available */
|
268 |
global $pagenow;
|
269 |
if ( 'plugins.php' === $pagenow )
|
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.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -108,7 +108,7 @@ function wppa_admin_bar_menu() {
|
|
108 |
if ( current_user_can( 'wppa_edit_sequence' ) && wppa_switch( 'opt_menu_edit_sequence' ) ) {
|
109 |
$menu_items['edit_squence'] = array(
|
110 |
'parent' => $wppaplus,
|
111 |
-
'title' => __('Edit Photo Sequence', 'wp-photo-album-plus' ),
|
112 |
'href' => admin_url( 'admin.php?page=wppa_edit_sequence' )
|
113 |
);
|
114 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* enhances the admin bar with wppa+ menu
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
108 |
if ( current_user_can( 'wppa_edit_sequence' ) && wppa_switch( 'opt_menu_edit_sequence' ) ) {
|
109 |
$menu_items['edit_squence'] = array(
|
110 |
'parent' => $wppaplus,
|
111 |
+
'title' => __( 'Edit Photo Sequence', 'wp-photo-album-plus' ),
|
112 |
'href' => admin_url( 'admin.php?page=wppa_edit_sequence' )
|
113 |
);
|
114 |
}
|
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.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -408,6 +408,7 @@ global $wppa_revno;
|
|
408 |
$tpviews = $treecounts['treephotoviews'];
|
409 |
$nsub = $treecounts['selfalbums'];
|
410 |
|
|
|
411 |
|
412 |
// Open the photo album admin page
|
413 |
wppa_echo( '<div class="wrap">' );
|
@@ -525,15 +526,19 @@ global $wppa_revno;
|
|
525 |
__( 'Crypt:', 'wp-photo-album-plus' ) . ' ' .
|
526 |
$crypt . '. ' .
|
527 |
|
|
|
|
|
528 |
__( 'Created:', 'wp-photo-album-plus' ) . ' ' .
|
529 |
wppa_local_date( '', $timestamp ) . ' ' . __( 'local time' , 'wp-photo-album-plus' ) . '. ' .
|
530 |
|
|
|
|
|
531 |
__( 'Modified:', 'wp-photo-album-plus' ) . ' ';
|
532 |
if ( $modified > $timestamp ) {
|
533 |
-
$result .= wppa_local_date( '', $modified ) . ' ' . __( 'local time' , 'wp-photo-album-plus' ) . '. ';
|
534 |
}
|
535 |
else {
|
536 |
-
$result .= __( 'Not modified', 'wp-photo-album-plus' ) . '. ';
|
537 |
}
|
538 |
|
539 |
// Views
|
@@ -543,7 +548,7 @@ global $wppa_revno;
|
|
543 |
__( 'Photo views:', 'wp-photo-album-plus' ) . ' ' . $pviews . '. ';
|
544 |
if ( $nsub ) {
|
545 |
$result .=
|
546 |
-
__( 'Photo views inc sub albums:', 'wp-photo-album-plus' ) . ' ' . $tpviews . '. ';
|
547 |
}
|
548 |
}
|
549 |
|
@@ -551,7 +556,7 @@ global $wppa_revno;
|
|
551 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
552 |
$click_arr = $wpdb->get_col( "SELECT clicks FROM $wpdb->wppa_photos WHERE album = $id" );
|
553 |
$result .=
|
554 |
-
__( 'Clicks:', 'wp-photo-album-plus' ) . ' ' . array_sum( $click_arr ) . '. ';
|
555 |
}
|
556 |
|
557 |
$result .= '<br>';
|
@@ -561,10 +566,10 @@ global $wppa_revno;
|
|
561 |
__( 'Owned by:', 'wp-photo-album-plus' ) . ' ';
|
562 |
if ( ! wppa_user_is( 'administrator' ) ) {
|
563 |
if ( $owner == '--- public ---' ) {
|
564 |
-
$result .= __( '--- public ---', 'wp-photo-album-plus' ) . ' ';
|
565 |
}
|
566 |
else {
|
567 |
-
$result .= $owner . '. ';
|
568 |
}
|
569 |
}
|
570 |
else {
|
@@ -574,7 +579,7 @@ global $wppa_revno;
|
|
574 |
type="text"
|
575 |
value="' . esc_attr( $owner ) . '"
|
576 |
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'owner\', this )"
|
577 |
-
|
578 |
}
|
579 |
else {
|
580 |
if ( wppa_switch( 'user_upload_on' ) ) {
|
@@ -594,8 +599,10 @@ global $wppa_revno;
|
|
594 |
title="' . esc_attr( $title ) . '"
|
595 |
>' .
|
596 |
wppa_get_user_select( $owner ) . '
|
597 |
-
</select
|
598 |
}
|
|
|
|
|
599 |
}
|
600 |
|
601 |
// Order # -->
|
@@ -610,8 +617,8 @@ global $wppa_revno;
|
|
610 |
if ( wppa_opt( 'list_albums_by' ) != '1' && $a_order != '0' ) {
|
611 |
$result .=
|
612 |
'<small class="description" style="color:red" >' .
|
613 |
-
|
614 |
-
'</small>' .
|
615 |
}
|
616 |
|
617 |
// Status
|
@@ -631,7 +638,7 @@ global $wppa_revno;
|
|
631 |
<option value="hidden"' . ( $status == 'hidden' ? ' selected' : '' ) . '>' .
|
632 |
__( 'Hidden', 'wp-photo-album-plus' ) . '
|
633 |
</option>
|
634 |
-
</select
|
635 |
|
636 |
// Parent
|
637 |
$result .=
|
@@ -678,7 +685,7 @@ global $wppa_revno;
|
|
678 |
) .
|
679 |
'</select>';
|
680 |
}
|
681 |
-
$result .=
|
682 |
|
683 |
// P-order-by
|
684 |
if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
@@ -735,7 +742,7 @@ global $wppa_revno;
|
|
735 |
$result .= '<option value="' . $values[$key] . '"' . $sel . '>' . $options[$key] . '</option>';
|
736 |
}
|
737 |
$result .= '
|
738 |
-
</select
|
739 |
}
|
740 |
|
741 |
// Child album order
|
@@ -771,7 +778,7 @@ global $wppa_revno;
|
|
771 |
$result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
|
772 |
}
|
773 |
$result .= '
|
774 |
-
</select
|
775 |
|
776 |
// Alternative thumbnail size
|
777 |
if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
@@ -788,7 +795,7 @@ global $wppa_revno;
|
|
788 |
<option value="yes"' . ( $alt_thumbsize ? $sel : '' ) . ' >' .
|
789 |
__( 'yes', 'wp-photo-album-plus' ) . '
|
790 |
</option>
|
791 |
-
</select
|
792 |
}
|
793 |
|
794 |
// Cover type
|
@@ -822,13 +829,13 @@ global $wppa_revno;
|
|
822 |
<option value="imagefactory-mcr"' . ( $cover_type == 'imagefactory-mcr' ? $sel : '' ) . ' >' .
|
823 |
__( 'Image Factory mcr', 'wp-photo-album-plus' ) . '
|
824 |
</option>
|
825 |
-
</select
|
826 |
}
|
827 |
|
828 |
// Cover photo
|
829 |
$result .=
|
830 |
__( 'Cover Photo:', 'wp-photo-album-plus' ) . ' ' .
|
831 |
-
wppa_main_photo( $main_photo, $cover_type ) .
|
832 |
|
833 |
// Upload limit
|
834 |
$result .=
|
@@ -856,7 +863,7 @@ global $wppa_revno;
|
|
856 |
<option value="604800"' . ( $lims[1] == '604800' ? $sel : '' ) . ' >' . __( 'per week', 'wp-photo-album-plus' ) . '</option>
|
857 |
<option value="2592000"' . ( $lims[1] == '2592000' ? $sel : '' ) . ' >' . __( 'per month', 'wp-photo-album-plus' ) . '</option>
|
858 |
<option value="31536000"' . ( $lims[1] == '31536000' ? $sel : '' ) . ' >' . __( 'per year', 'wp-photo-album-plus' ) . '</option>
|
859 |
-
</select
|
860 |
}
|
861 |
else {
|
862 |
if ( $lims[0] == '0' ) {
|
@@ -875,6 +882,7 @@ global $wppa_revno;
|
|
875 |
}
|
876 |
$result .= '. ';
|
877 |
}
|
|
|
878 |
|
879 |
// Tree limit
|
880 |
$title = __( 'The upload limit for this album and all its (grand)children.', 'wp-photo-album-plus' ) . ' ' .
|
@@ -906,7 +914,7 @@ global $wppa_revno;
|
|
906 |
<option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
|
907 |
<option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
|
908 |
<option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
|
909 |
-
</select> ';
|
910 |
|
911 |
// Overrulable display options / next 4 items
|
912 |
if ( $displayopts ) {
|
@@ -928,7 +936,7 @@ global $wppa_revno;
|
|
928 |
<option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
|
929 |
<option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
|
930 |
<option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
|
931 |
-
</select>';
|
932 |
|
933 |
// Display description
|
934 |
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
@@ -940,7 +948,7 @@ global $wppa_revno;
|
|
940 |
<option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
|
941 |
<option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
|
942 |
<option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
|
943 |
-
</select>';
|
944 |
|
945 |
// Display rating
|
946 |
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
@@ -952,7 +960,7 @@ global $wppa_revno;
|
|
952 |
<option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
|
953 |
<option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
|
954 |
<option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
|
955 |
-
</select>';
|
956 |
|
957 |
// Display comments
|
958 |
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
@@ -975,11 +983,11 @@ global $wppa_revno;
|
|
975 |
__( 'Watermark file:', 'wp-photo-album-plus' ) . '
|
976 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'wmfile\', this )" >' .
|
977 |
wppa_watermark_file_select( 'album', $id ) . '
|
978 |
-
</select
|
979 |
__( 'Watermark pos:', 'wp-photo-album-plus' ) . '
|
980 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'wmpos\', this )" >' .
|
981 |
wppa_watermark_pos_select( 'album', $id ) . '
|
982 |
-
</select>';
|
983 |
}
|
984 |
|
985 |
// Schedule for delete
|
@@ -1004,7 +1012,7 @@ global $wppa_revno;
|
|
1004 |
>' .
|
1005 |
wppa_get_date_time_select_html( 'delalbum', $id, $may_change ) . '
|
1006 |
</span>
|
1007 |
-
';
|
1008 |
}
|
1009 |
|
1010 |
// Status
|
@@ -1014,7 +1022,7 @@ global $wppa_revno;
|
|
1014 |
id="albumstatus-' . $id . '"
|
1015 |
style="font-weight:bold;color:#00AA00">' .
|
1016 |
esc_html( $remark ) . '
|
1017 |
-
</span>';
|
1018 |
|
1019 |
|
1020 |
$result .= '
|
@@ -1331,40 +1339,45 @@ global $wppa_revno;
|
|
1331 |
$result .= '
|
1332 |
<input
|
1333 |
type="button"
|
|
|
1334 |
title="' . esc_attr( __( 'Apply categories to all (grand)children.', 'wp-photo-album-plus' ) ) . '"
|
1335 |
onclick="wppaTryInheritCats( ' . $id . ' )"
|
1336 |
value="' . esc_attr( __( 'Apply Cats to subalbums', 'wp-photo-album-plus' ) ) . '"
|
1337 |
-
/>
|
1338 |
<input
|
1339 |
type="button"
|
|
|
1340 |
title="' . esc_attr( __( 'Add categories to all (grand)children.', 'wp-photo-album-plus' ) ) . '"
|
1341 |
onclick="wppaTryAddCats( ' . $id . ' )"
|
1342 |
value="' . esc_attr( __( 'Add Cats to subalbums', 'wp-photo-album-plus' ) ) . '"
|
1343 |
-
/>';
|
1344 |
|
1345 |
// Apply default tags
|
1346 |
$result .= '
|
1347 |
<input
|
1348 |
type="button"
|
|
|
1349 |
title="' . esc_attr( __( 'Tag all photos in this album with the default tags.', 'wp-photo-album-plus' ) ) . '"
|
1350 |
onclick="wppaTryApplyDeftags( ' . $id . ' )"
|
1351 |
value="' . esc_attr( __( 'Apply default tags', 'wp-photo-album-plus' ) ) . '"
|
1352 |
-
/>
|
1353 |
<input
|
1354 |
type="button"
|
|
|
1355 |
title="' . esc_attr( __( 'Add the default tags to all photos in this album.', 'wp-photo-album-plus' ) ) . '"
|
1356 |
onclick="wppaTryAddDeftags( ' . $id . ' )"
|
1357 |
value="' . esc_attr( __( 'Add default tags', 'wp-photo-album-plus' ) ) . '"
|
1358 |
-
/>';
|
1359 |
|
1360 |
// Schedule all
|
1361 |
$result .= '
|
1362 |
<input
|
1363 |
type="button"
|
|
|
1364 |
title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
|
1365 |
onclick="wppaTryScheduleAll( ' . $id . ' )"
|
1366 |
value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
|
1367 |
-
/>';
|
1368 |
|
1369 |
// Reset Ratings
|
1370 |
if ( wppa_switch( 'rating_on') ) {
|
@@ -1372,9 +1385,10 @@ global $wppa_revno;
|
|
1372 |
$result .= '
|
1373 |
<input
|
1374 |
type="button"
|
|
|
1375 |
onclick="' . $onc . '"
|
1376 |
value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
|
1377 |
-
/>';
|
1378 |
}
|
1379 |
|
1380 |
// Apply New photo desc
|
@@ -1383,9 +1397,10 @@ global $wppa_revno;
|
|
1383 |
$result .= '
|
1384 |
<input
|
1385 |
type="button"
|
|
|
1386 |
onclick="' . $onc . '"
|
1387 |
value="' . esc_attr( __( 'Apply new photo desc', 'wp-photo-album-plus' ) ) . '"
|
1388 |
-
/>';
|
1389 |
}
|
1390 |
|
1391 |
// Remake all
|
@@ -1394,9 +1409,10 @@ global $wppa_revno;
|
|
1394 |
$result .= '
|
1395 |
<input
|
1396 |
type="button"
|
|
|
1397 |
onclick="' . $onc . '"
|
1398 |
value="' . esc_attr( __( 'Remake all', 'wp-photo-album-plus' ) ) . '"
|
1399 |
-
/>';
|
1400 |
}
|
1401 |
|
1402 |
// Create subalbum
|
@@ -1407,9 +1423,10 @@ global $wppa_revno;
|
|
1407 |
$result .= '
|
1408 |
<input
|
1409 |
type="button"
|
|
|
1410 |
onclick="' . $onc . '"
|
1411 |
value="' . esc_attr( __( 'Create child', 'wp-photo-album-plus' ) ) . '"
|
1412 |
-
/>';
|
1413 |
}
|
1414 |
|
1415 |
// Create sibling
|
@@ -1428,9 +1445,10 @@ global $wppa_revno;
|
|
1428 |
$result .= '
|
1429 |
<input
|
1430 |
type="button"
|
|
|
1431 |
onclick="' . $onc . '"
|
1432 |
value="' . esc_attr( __( 'Create sibling', 'wp-photo-album-plus' ) ) . '"
|
1433 |
-
/>';
|
1434 |
}
|
1435 |
|
1436 |
// Edit parent
|
@@ -1440,9 +1458,10 @@ global $wppa_revno;
|
|
1440 |
$result .= '
|
1441 |
<input
|
1442 |
type="button"
|
|
|
1443 |
onclick="' . $onc . '"
|
1444 |
value="' . esc_attr( __( 'Edit parent', 'wp-photo-album-plus' ) ) . '"
|
1445 |
-
/>';
|
1446 |
}
|
1447 |
|
1448 |
$a = wppa_allow_uploads( $id );
|
@@ -1467,9 +1486,10 @@ global $wppa_revno;
|
|
1467 |
$result .= '
|
1468 |
<input
|
1469 |
type="button"
|
|
|
1470 |
onclick="' . $onc . '"
|
1471 |
value="' . $val .'"
|
1472 |
-
/>';
|
1473 |
}
|
1474 |
|
1475 |
// Goto Import
|
@@ -1480,9 +1500,10 @@ global $wppa_revno;
|
|
1480 |
$result .= '
|
1481 |
<input
|
1482 |
type="button"
|
|
|
1483 |
onclick="' . $onc . '"
|
1484 |
value="' . $val .'"
|
1485 |
-
/>';
|
1486 |
}
|
1487 |
|
1488 |
// Download album
|
@@ -1491,6 +1512,7 @@ global $wppa_revno;
|
|
1491 |
$result .= '
|
1492 |
<input
|
1493 |
type="button"
|
|
|
1494 |
onclick="wppaAjaxDownloadAlbum( 0, ' . $albuminfo['id'] . ' );"
|
1495 |
value="' . esc_attr( __('Download album', 'wp-photo-album-plus' ) ).'"
|
1496 |
/>
|
@@ -1499,7 +1521,7 @@ global $wppa_revno;
|
|
1499 |
src="' . wppa_get_imgdir() . 'spinner.gif"
|
1500 |
style="margin-left:6px;display:none;height:18px;position:relative;bottom:-6px"
|
1501 |
alt="spinner"
|
1502 |
-
/>';
|
1503 |
}
|
1504 |
|
1505 |
// Set all to pano
|
@@ -1508,6 +1530,7 @@ global $wppa_revno;
|
|
1508 |
$result .= '
|
1509 |
<input
|
1510 |
type="button"
|
|
|
1511 |
onclick="wppaTrySetAllPanorama(' . $albuminfo['id'] . ')"
|
1512 |
value="' . esc_attr( __('Set all to panorama', 'wp-photo-album-plus' ) ).':"
|
1513 |
/>
|
@@ -1517,7 +1540,7 @@ global $wppa_revno;
|
|
1517 |
<option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
|
1518 |
<option value="1">' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>
|
1519 |
<option value="2">' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>
|
1520 |
-
</select>';
|
1521 |
}
|
1522 |
|
1523 |
$result .= '
|
@@ -1712,35 +1735,23 @@ global $wppa_revno;
|
|
1712 |
$result = '
|
1713 |
<div class="wrap">' .
|
1714 |
wppa_admin_spinner() . '
|
1715 |
-
<
|
1716 |
-
<h1 style="display:inline">' . __( 'Manage Albums', 'wp-photo-album-plus' ) . '</h1>
|
1717 |
-
<div style="clear:both"></div>';
|
1718 |
|
1719 |
// The Create new album button
|
1720 |
if ( wppa_can_create_top_album() ) {
|
1721 |
-
$url =
|
1722 |
$vfy = __( 'Are you sure you want to create a new album?', 'wp-photo-album-plus' );
|
1723 |
$result .= '
|
1724 |
-
<
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
<input type="hidden" name="edit-id" value="new" />
|
1731 |
-
<input type="submit"
|
1732 |
-
class="button-primary"
|
1733 |
-
onclick="return confirm(\'' . $vfy . '\');"
|
1734 |
-
value="' . esc_attr__( 'Create New Empty Album', 'wp-photo-album-plus' ) . '"
|
1735 |
-
style="height:28px;"
|
1736 |
-
/>
|
1737 |
-
</form>';
|
1738 |
-
if ( wppa_is_mobile() ) {
|
1739 |
-
$result .= '<br>';
|
1740 |
-
}
|
1741 |
}
|
1742 |
|
1743 |
-
// The switch to button(s)
|
|
|
1744 |
if ( $style == 'flat' ) {
|
1745 |
$result .= '
|
1746 |
<input
|
@@ -1759,9 +1770,8 @@ global $wppa_revno;
|
|
1759 |
value="' . esc_attr__( 'Switch to Flat table', 'wp-photo-album-plus' ) . '"
|
1760 |
/>';
|
1761 |
}
|
1762 |
-
|
1763 |
-
|
1764 |
-
}
|
1765 |
if ( $style != 'flat' ) {
|
1766 |
$result .= '
|
1767 |
<input
|
@@ -1790,53 +1800,101 @@ global $wppa_revno;
|
|
1790 |
"
|
1791 |
value="' . esc_attr__( 'Close all', 'wp-photo-album-plus' ) . '"
|
1792 |
/>';
|
1793 |
-
if ( wppa_is_mobile() ) {
|
1794 |
-
$result .= '<br>';
|
1795 |
-
}
|
1796 |
}
|
|
|
1797 |
|
1798 |
-
|
1799 |
-
|
1800 |
-
onchange="document.location.href=\''.get_admin_url().'admin.php?page=wppa_admin_menu&switchto=flat&filter=\'+this.value"
|
1801 |
-
>';
|
1802 |
-
$opts = $wpdb->get_col( "SELECT slug FROM $wpdb->wppa_index WHERE albums <> '' ORDER BY slug" );
|
1803 |
-
$f = wppa_get( 'filter' );
|
1804 |
$result .= '
|
1805 |
-
<
|
1806 |
-
|
1807 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1808 |
}
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1813 |
}
|
1814 |
|
1815 |
-
|
1816 |
-
$
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1828 |
|
1829 |
$the_js = '
|
1830 |
function wppaGoEditAlbNo() {
|
1831 |
-
var id = document.getElementById("wppa-edit-albid").value;
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1835 |
};';
|
1836 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
1837 |
|
1838 |
-
|
1839 |
-
$result .= '<br>';
|
1840 |
wppa_echo( $result );
|
1841 |
|
1842 |
// The table of existing albums
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* create, edit and delete albums
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
408 |
$tpviews = $treecounts['treephotoviews'];
|
409 |
$nsub = $treecounts['selfalbums'];
|
410 |
|
411 |
+
$br = wppa_is_phone() ? '<br>' : ' ';
|
412 |
|
413 |
// Open the photo album admin page
|
414 |
wppa_echo( '<div class="wrap">' );
|
526 |
__( 'Crypt:', 'wp-photo-album-plus' ) . ' ' .
|
527 |
$crypt . '. ' .
|
528 |
|
529 |
+
$br .
|
530 |
+
|
531 |
__( 'Created:', 'wp-photo-album-plus' ) . ' ' .
|
532 |
wppa_local_date( '', $timestamp ) . ' ' . __( 'local time' , 'wp-photo-album-plus' ) . '. ' .
|
533 |
|
534 |
+
$br .
|
535 |
+
|
536 |
__( 'Modified:', 'wp-photo-album-plus' ) . ' ';
|
537 |
if ( $modified > $timestamp ) {
|
538 |
+
$result .= wppa_local_date( '', $modified ) . ' ' . __( 'local time' , 'wp-photo-album-plus' ) . '. ' . $br;
|
539 |
}
|
540 |
else {
|
541 |
+
$result .= __( 'Not modified', 'wp-photo-album-plus' ) . '. ' . $br;
|
542 |
}
|
543 |
|
544 |
// Views
|
548 |
__( 'Photo views:', 'wp-photo-album-plus' ) . ' ' . $pviews . '. ';
|
549 |
if ( $nsub ) {
|
550 |
$result .=
|
551 |
+
__( 'Photo views inc sub albums:', 'wp-photo-album-plus' ) . ' ' . $tpviews . '. ' . $br;
|
552 |
}
|
553 |
}
|
554 |
|
556 |
if ( wppa_switch( 'track_clickcounts' ) ) {
|
557 |
$click_arr = $wpdb->get_col( "SELECT clicks FROM $wpdb->wppa_photos WHERE album = $id" );
|
558 |
$result .=
|
559 |
+
__( 'Clicks:', 'wp-photo-album-plus' ) . ' ' . array_sum( $click_arr ) . '. ' . $br;
|
560 |
}
|
561 |
|
562 |
$result .= '<br>';
|
566 |
__( 'Owned by:', 'wp-photo-album-plus' ) . ' ';
|
567 |
if ( ! wppa_user_is( 'administrator' ) ) {
|
568 |
if ( $owner == '--- public ---' ) {
|
569 |
+
$result .= __( '--- public ---', 'wp-photo-album-plus' ) . ' ' . $br;
|
570 |
}
|
571 |
else {
|
572 |
+
$result .= $owner . '. ' . $br;
|
573 |
}
|
574 |
}
|
575 |
else {
|
579 |
type="text"
|
580 |
value="' . esc_attr( $owner ) . '"
|
581 |
onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'owner\', this )"
|
582 |
+
/>';
|
583 |
}
|
584 |
else {
|
585 |
if ( wppa_switch( 'user_upload_on' ) ) {
|
599 |
title="' . esc_attr( $title ) . '"
|
600 |
>' .
|
601 |
wppa_get_user_select( $owner ) . '
|
602 |
+
</select>';
|
603 |
}
|
604 |
+
|
605 |
+
$result .= $br;
|
606 |
}
|
607 |
|
608 |
// Order # -->
|
617 |
if ( wppa_opt( 'list_albums_by' ) != '1' && $a_order != '0' ) {
|
618 |
$result .=
|
619 |
'<small class="description" style="color:red" >' .
|
620 |
+
esc_html__( 'Album sequence number has only effect if you set the album sort order method to <b>Order #</b> in the Photo Albums -> Settings screen.<br>', 'wp-photo-album-plus' ) .
|
621 |
+
'</small>' . $br;
|
622 |
}
|
623 |
|
624 |
// Status
|
638 |
<option value="hidden"' . ( $status == 'hidden' ? ' selected' : '' ) . '>' .
|
639 |
__( 'Hidden', 'wp-photo-album-plus' ) . '
|
640 |
</option>
|
641 |
+
</select>' . $br;
|
642 |
|
643 |
// Parent
|
644 |
$result .=
|
685 |
) .
|
686 |
'</select>';
|
687 |
}
|
688 |
+
$result .= $br;
|
689 |
|
690 |
// P-order-by
|
691 |
if ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
742 |
$result .= '<option value="' . $values[$key] . '"' . $sel . '>' . $options[$key] . '</option>';
|
743 |
}
|
744 |
$result .= '
|
745 |
+
</select>' . $br;
|
746 |
}
|
747 |
|
748 |
// Child album order
|
778 |
$result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
|
779 |
}
|
780 |
$result .= '
|
781 |
+
</select>' . $br;
|
782 |
|
783 |
// Alternative thumbnail size
|
784 |
if ( ! wppa_switch( 'alt_is_restricted' ) || wppa_user_is( 'administrator' ) ) {
|
795 |
<option value="yes"' . ( $alt_thumbsize ? $sel : '' ) . ' >' .
|
796 |
__( 'yes', 'wp-photo-album-plus' ) . '
|
797 |
</option>
|
798 |
+
</select>' . $br;
|
799 |
}
|
800 |
|
801 |
// Cover type
|
829 |
<option value="imagefactory-mcr"' . ( $cover_type == 'imagefactory-mcr' ? $sel : '' ) . ' >' .
|
830 |
__( 'Image Factory mcr', 'wp-photo-album-plus' ) . '
|
831 |
</option>
|
832 |
+
</select>' . $br;
|
833 |
}
|
834 |
|
835 |
// Cover photo
|
836 |
$result .=
|
837 |
__( 'Cover Photo:', 'wp-photo-album-plus' ) . ' ' .
|
838 |
+
wppa_main_photo( $main_photo, $cover_type ) . $br;
|
839 |
|
840 |
// Upload limit
|
841 |
$result .=
|
863 |
<option value="604800"' . ( $lims[1] == '604800' ? $sel : '' ) . ' >' . __( 'per week', 'wp-photo-album-plus' ) . '</option>
|
864 |
<option value="2592000"' . ( $lims[1] == '2592000' ? $sel : '' ) . ' >' . __( 'per month', 'wp-photo-album-plus' ) . '</option>
|
865 |
<option value="31536000"' . ( $lims[1] == '31536000' ? $sel : '' ) . ' >' . __( 'per year', 'wp-photo-album-plus' ) . '</option>
|
866 |
+
</select>';
|
867 |
}
|
868 |
else {
|
869 |
if ( $lims[0] == '0' ) {
|
882 |
}
|
883 |
$result .= '. ';
|
884 |
}
|
885 |
+
$result .= $br;
|
886 |
|
887 |
// Tree limit
|
888 |
$title = __( 'The upload limit for this album and all its (grand)children.', 'wp-photo-album-plus' ) . ' ' .
|
914 |
<option value=""'.($zoomable==''?' selected': '').'>' . $def . '</option>
|
915 |
<option value="on"'.($zoomable=='on'?' selected': '').'>' . $yes . '</option>
|
916 |
<option value="off"'.($zoomable=='off'?' selected': '').'>' . $no . '</option>
|
917 |
+
</select> ' . $br;
|
918 |
|
919 |
// Overrulable display options / next 4 items
|
920 |
if ( $displayopts ) {
|
936 |
<option value="0"'.($disp_opt[0]=='0'?' selected': '').'>' . $def . '</option>
|
937 |
<option value="1"'.($disp_opt[0]=='1'?' selected': '').'>' . $yes . '</option>
|
938 |
<option value="-1"'.($disp_opt[0]=='-1'?' selected': '').'>' . $no . '</option>
|
939 |
+
</select>' . $br;
|
940 |
|
941 |
// Display description
|
942 |
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
948 |
<option value="0"'.($disp_opt[1]=='0'?' selected': '').'>' . $def . '</option>
|
949 |
<option value="1"'.($disp_opt[1]=='1'?' selected': '').'>' . $yes . '</option>
|
950 |
<option value="-1"'.($disp_opt[1]=='-1'?' selected': '').'>' . $no . '</option>
|
951 |
+
</select>' . $br;
|
952 |
|
953 |
// Display rating
|
954 |
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
960 |
<option value="0"'.($disp_opt[2]=='0'?' selected': '').'>' . $def . '</option>
|
961 |
<option value="1"'.($disp_opt[2]=='1'?' selected': '').'>' . $yes . '</option>
|
962 |
<option value="-1"'.($disp_opt[2]=='-1'?' selected': '').'>' . $no . '</option>
|
963 |
+
</select>' . $br;
|
964 |
|
965 |
// Display comments
|
966 |
$title = __( 'When set other than default, this setting will overrule the default settings.', 'wp-photo-album-plus' ) . ' ' .
|
983 |
__( 'Watermark file:', 'wp-photo-album-plus' ) . '
|
984 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'wmfile\', this )" >' .
|
985 |
wppa_watermark_file_select( 'album', $id ) . '
|
986 |
+
</select>' . $br .
|
987 |
__( 'Watermark pos:', 'wp-photo-album-plus' ) . '
|
988 |
<select onchange="wppaAjaxUpdateAlbum( ' . $id . ', \'wmpos\', this )" >' .
|
989 |
wppa_watermark_pos_select( 'album', $id ) . '
|
990 |
+
</select>' . $br;
|
991 |
}
|
992 |
|
993 |
// Schedule for delete
|
1012 |
>' .
|
1013 |
wppa_get_date_time_select_html( 'delalbum', $id, $may_change ) . '
|
1014 |
</span>
|
1015 |
+
' . $br;
|
1016 |
}
|
1017 |
|
1018 |
// Status
|
1022 |
id="albumstatus-' . $id . '"
|
1023 |
style="font-weight:bold;color:#00AA00">' .
|
1024 |
esc_html( $remark ) . '
|
1025 |
+
</span>' . $br;
|
1026 |
|
1027 |
|
1028 |
$result .= '
|
1339 |
$result .= '
|
1340 |
<input
|
1341 |
type="button"
|
1342 |
+
class="wppa-admin-button"
|
1343 |
title="' . esc_attr( __( 'Apply categories to all (grand)children.', 'wp-photo-album-plus' ) ) . '"
|
1344 |
onclick="wppaTryInheritCats( ' . $id . ' )"
|
1345 |
value="' . esc_attr( __( 'Apply Cats to subalbums', 'wp-photo-album-plus' ) ) . '"
|
1346 |
+
/>' . $br . '
|
1347 |
<input
|
1348 |
type="button"
|
1349 |
+
class="wppa-admin-button"
|
1350 |
title="' . esc_attr( __( 'Add categories to all (grand)children.', 'wp-photo-album-plus' ) ) . '"
|
1351 |
onclick="wppaTryAddCats( ' . $id . ' )"
|
1352 |
value="' . esc_attr( __( 'Add Cats to subalbums', 'wp-photo-album-plus' ) ) . '"
|
1353 |
+
/>' . $br;
|
1354 |
|
1355 |
// Apply default tags
|
1356 |
$result .= '
|
1357 |
<input
|
1358 |
type="button"
|
1359 |
+
class="wppa-admin-button"
|
1360 |
title="' . esc_attr( __( 'Tag all photos in this album with the default tags.', 'wp-photo-album-plus' ) ) . '"
|
1361 |
onclick="wppaTryApplyDeftags( ' . $id . ' )"
|
1362 |
value="' . esc_attr( __( 'Apply default tags', 'wp-photo-album-plus' ) ) . '"
|
1363 |
+
/>' . $br . '
|
1364 |
<input
|
1365 |
type="button"
|
1366 |
+
class="wppa-admin-button"
|
1367 |
title="' . esc_attr( __( 'Add the default tags to all photos in this album.', 'wp-photo-album-plus' ) ) . '"
|
1368 |
onclick="wppaTryAddDeftags( ' . $id . ' )"
|
1369 |
value="' . esc_attr( __( 'Add default tags', 'wp-photo-album-plus' ) ) . '"
|
1370 |
+
/>' . $br;
|
1371 |
|
1372 |
// Schedule all
|
1373 |
$result .= '
|
1374 |
<input
|
1375 |
type="button"
|
1376 |
+
class="wppa-admin-button"
|
1377 |
title="' . esc_attr( __( 'Schedule all photos in this album for later publishing.', 'wp-photo-album-plus' ) ) . '"
|
1378 |
onclick="wppaTryScheduleAll( ' . $id . ' )"
|
1379 |
value="' . esc_attr( __( 'Schedule all', 'wp-photo-album-plus' ) ) . '"
|
1380 |
+
/>' . $br;
|
1381 |
|
1382 |
// Reset Ratings
|
1383 |
if ( wppa_switch( 'rating_on') ) {
|
1385 |
$result .= '
|
1386 |
<input
|
1387 |
type="button"
|
1388 |
+
class="wppa-admin-button"
|
1389 |
onclick="' . $onc . '"
|
1390 |
value="' . esc_attr( __( 'Reset ratings', 'wp-photo-album-plus' ) ) . '"
|
1391 |
+
/>' . $br;
|
1392 |
}
|
1393 |
|
1394 |
// Apply New photo desc
|
1397 |
$result .= '
|
1398 |
<input
|
1399 |
type="button"
|
1400 |
+
class="wppa-admin-button"
|
1401 |
onclick="' . $onc . '"
|
1402 |
value="' . esc_attr( __( 'Apply new photo desc', 'wp-photo-album-plus' ) ) . '"
|
1403 |
+
/>' . $br;
|
1404 |
}
|
1405 |
|
1406 |
// Remake all
|
1409 |
$result .= '
|
1410 |
<input
|
1411 |
type="button"
|
1412 |
+
class="wppa-admin-button"
|
1413 |
onclick="' . $onc . '"
|
1414 |
value="' . esc_attr( __( 'Remake all', 'wp-photo-album-plus' ) ) . '"
|
1415 |
+
/>' . $br;
|
1416 |
}
|
1417 |
|
1418 |
// Create subalbum
|
1423 |
$result .= '
|
1424 |
<input
|
1425 |
type="button"
|
1426 |
+
class="wppa-admin-button"
|
1427 |
onclick="' . $onc . '"
|
1428 |
value="' . esc_attr( __( 'Create child', 'wp-photo-album-plus' ) ) . '"
|
1429 |
+
/>' . $br;
|
1430 |
}
|
1431 |
|
1432 |
// Create sibling
|
1445 |
$result .= '
|
1446 |
<input
|
1447 |
type="button"
|
1448 |
+
class="wppa-admin-button"
|
1449 |
onclick="' . $onc . '"
|
1450 |
value="' . esc_attr( __( 'Create sibling', 'wp-photo-album-plus' ) ) . '"
|
1451 |
+
/>' . $br;
|
1452 |
}
|
1453 |
|
1454 |
// Edit parent
|
1458 |
$result .= '
|
1459 |
<input
|
1460 |
type="button"
|
1461 |
+
class="wppa-admin-button"
|
1462 |
onclick="' . $onc . '"
|
1463 |
value="' . esc_attr( __( 'Edit parent', 'wp-photo-album-plus' ) ) . '"
|
1464 |
+
/>' . $br;
|
1465 |
}
|
1466 |
|
1467 |
$a = wppa_allow_uploads( $id );
|
1486 |
$result .= '
|
1487 |
<input
|
1488 |
type="button"
|
1489 |
+
class="wppa-admin-button"
|
1490 |
onclick="' . $onc . '"
|
1491 |
value="' . $val .'"
|
1492 |
+
/>' . $br;
|
1493 |
}
|
1494 |
|
1495 |
// Goto Import
|
1500 |
$result .= '
|
1501 |
<input
|
1502 |
type="button"
|
1503 |
+
class="wppa-admin-button"
|
1504 |
onclick="' . $onc . '"
|
1505 |
value="' . $val .'"
|
1506 |
+
/>' . $br;
|
1507 |
}
|
1508 |
|
1509 |
// Download album
|
1512 |
$result .= '
|
1513 |
<input
|
1514 |
type="button"
|
1515 |
+
class="wppa-admin-button"
|
1516 |
onclick="wppaAjaxDownloadAlbum( 0, ' . $albuminfo['id'] . ' );"
|
1517 |
value="' . esc_attr( __('Download album', 'wp-photo-album-plus' ) ).'"
|
1518 |
/>
|
1521 |
src="' . wppa_get_imgdir() . 'spinner.gif"
|
1522 |
style="margin-left:6px;display:none;height:18px;position:relative;bottom:-6px"
|
1523 |
alt="spinner"
|
1524 |
+
/>' . $br;
|
1525 |
}
|
1526 |
|
1527 |
// Set all to pano
|
1530 |
$result .= '
|
1531 |
<input
|
1532 |
type="button"
|
1533 |
+
class="wppa-admin-button"
|
1534 |
onclick="wppaTrySetAllPanorama(' . $albuminfo['id'] . ')"
|
1535 |
value="' . esc_attr( __('Set all to panorama', 'wp-photo-album-plus' ) ).':"
|
1536 |
/>
|
1540 |
<option value="0">' . __( '- none -', 'wp-photo-album-plus' ) . '</option>
|
1541 |
<option value="1">' . __( '360° Spheric', 'wp-photo-album-plus' ) . '</option>
|
1542 |
<option value="2">' . __( 'Non 360° Flat', 'wp-photo-album-plus' ) . '</option>
|
1543 |
+
</select>' . $br;
|
1544 |
}
|
1545 |
|
1546 |
$result .= '
|
1735 |
$result = '
|
1736 |
<div class="wrap">' .
|
1737 |
wppa_admin_spinner() . '
|
1738 |
+
<h1 class="wp-heading-inline">' . __( 'Manage Albums', 'wp-photo-album-plus' ) . '</h1>';
|
|
|
|
|
1739 |
|
1740 |
// The Create new album button
|
1741 |
if ( wppa_can_create_top_album() ) {
|
1742 |
+
$url = get_admin_url( 'admin.php' ) . '?page=wppa_admin_menu&tab=edit&edit-id=new&wppa-nonce=' . wp_create_nonce( 'wppa-nonce' );
|
1743 |
$vfy = __( 'Are you sure you want to create a new album?', 'wp-photo-album-plus' );
|
1744 |
$result .= '
|
1745 |
+
<a
|
1746 |
+
onclick="return confirm(\'' . $vfy . '\');"
|
1747 |
+
href="' . $url . '"
|
1748 |
+
class="page-title-action">' .
|
1749 |
+
__( 'Add New', 'wp-photo-album-plus' ) . '
|
1750 |
+
</a><br>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1751 |
}
|
1752 |
|
1753 |
+
// The switch to flat/collapsable button(s)
|
1754 |
+
$result .= '<p style="float:left">';
|
1755 |
if ( $style == 'flat' ) {
|
1756 |
$result .= '
|
1757 |
<input
|
1770 |
value="' . esc_attr__( 'Switch to Flat table', 'wp-photo-album-plus' ) . '"
|
1771 |
/>';
|
1772 |
}
|
1773 |
+
|
1774 |
+
// The open all/close all buttons
|
|
|
1775 |
if ( $style != 'flat' ) {
|
1776 |
$result .= '
|
1777 |
<input
|
1800 |
"
|
1801 |
value="' . esc_attr__( 'Close all', 'wp-photo-album-plus' ) . '"
|
1802 |
/>';
|
|
|
|
|
|
|
1803 |
}
|
1804 |
+
$result .= '</p>';
|
1805 |
|
1806 |
+
// Edit by id
|
1807 |
+
if ( wppa_has_many_albums() ) {
|
|
|
|
|
|
|
|
|
1808 |
$result .= '
|
1809 |
+
<p style="float:right">
|
1810 |
+
<input
|
1811 |
+
id="wppa-edit-albid"
|
1812 |
+
type="number"
|
1813 |
+
min="1"
|
1814 |
+
placeholder="' . __( 'Album id', 'wp-photo-album-plus' ) . '"
|
1815 |
+
title="' . __( 'Enter the number of the album you want to edit', 'wp-photo-album-plus' ) . '"
|
1816 |
+
style="width:120px;cursor:pointer"
|
1817 |
+
/>
|
1818 |
+
<input
|
1819 |
+
type="button"
|
1820 |
+
value="' . __( 'Edit album', 'wp-photo-album-plus' ) . '"
|
1821 |
+
onclick="wppaGoEditAlbNo();"
|
1822 |
+
/>
|
1823 |
+
</p>';
|
1824 |
+
}
|
1825 |
+
else {
|
1826 |
+
$albids = $wpdb->get_col( "SELECT id FROM $wpdb->wppa_albums ORDER BY id" );
|
1827 |
+
if ( ! wppa_user_is( 'administrator' ) ) foreach( array_keys( $albids ) as $key ) {
|
1828 |
+
if ( ! wppa_have_access( $albids[$key] ) ) {
|
1829 |
+
unset( $albids[$key] );
|
1830 |
+
}
|
1831 |
}
|
1832 |
+
$result .= '
|
1833 |
+
<p style="float:right">
|
1834 |
+
<select
|
1835 |
+
id="wppa-edit-albid"
|
1836 |
+
title="' . __( 'Select the number of the album you want to edit', 'wp-photo-album-plus' ) . '"
|
1837 |
+
style="width:120px;cursor:pointer"
|
1838 |
+
/>
|
1839 |
+
<option value="" selected disabled>' . __( 'Album id', 'wp-photo-album-plus' ) . '</option>';
|
1840 |
+
foreach( $albids as $alb ) {
|
1841 |
+
$result .= '<option value="' . $alb . '">' . $alb . '</option>';
|
1842 |
+
}
|
1843 |
+
$result .= '
|
1844 |
+
</select>
|
1845 |
+
<input
|
1846 |
+
type="button"
|
1847 |
+
value="' . __( 'Edit album', 'wp-photo-album-plus' ) . '"
|
1848 |
+
onclick="wppaGoEditAlbNo();"
|
1849 |
+
/>
|
1850 |
+
</p>';
|
1851 |
}
|
1852 |
|
1853 |
+
// Filter by searchword
|
1854 |
+
$opts = $wpdb->get_col( "SELECT slug FROM $wpdb->wppa_index WHERE albums <> '' ORDER BY slug" );
|
1855 |
+
$f = wppa_get( 'filter' );
|
1856 |
+
$result .= '
|
1857 |
+
<p style="float:right">
|
1858 |
+
<select
|
1859 |
+
id="wppa-edit-filter"
|
1860 |
+
title="' . __( 'Select an album search word', 'wp-photo-album-plus' ) . '">
|
1861 |
+
<option value="" selected disabled>' . __( 'Filter by', 'wp-photo-album-plus' ) . '</option>';
|
1862 |
+
foreach( $opts as $opt ) {
|
1863 |
+
$result .= '<option value="' . $opt . '"' . ( $f == $opt ? ' selected ' : '' ) . '>' . $opt . '</option>';
|
1864 |
+
}
|
1865 |
+
$result .=
|
1866 |
+
'</select>
|
1867 |
+
<input
|
1868 |
+
type="button"
|
1869 |
+
class="button-secundary"
|
1870 |
+
onclick="wppaGoApplyFilter();"
|
1871 |
+
value="' . __( 'Apply filter', 'wp-photo-album-plus' ) . '"
|
1872 |
+
/>
|
1873 |
+
</p>';
|
1874 |
|
1875 |
$the_js = '
|
1876 |
function wppaGoEditAlbNo() {
|
1877 |
+
var id = parseInt(document.getElementById("wppa-edit-albid").value);
|
1878 |
+
if (id > 0) {
|
1879 |
+
var nonce = "' . wp_create_nonce( 'wppa-nonce' ) .'";
|
1880 |
+
var href = "' . get_admin_url() . 'admin.php?page=wppa_admin_menu&wppa-nonce="+nonce+"&tab=edit&edit-id="+id;
|
1881 |
+
document.location.href=href;
|
1882 |
+
}
|
1883 |
+
else {
|
1884 |
+
alert("' . __( 'Please enter a valid album id', 'wp-photo-album-plus' ) . '");
|
1885 |
+
}
|
1886 |
+
};
|
1887 |
+
function wppaGoApplyFilter() {
|
1888 |
+
var filter = document.getElementById("wppa-edit-filter").value;
|
1889 |
+
if(filter) {
|
1890 |
+
document.location.href="'.get_admin_url().'admin.php?page=wppa_admin_menu&switchto=flat&filter="+filter;
|
1891 |
+
}
|
1892 |
+
else {
|
1893 |
+
alert("' . __( 'Please select a filter token', 'wp-photo-album-plus' ) . '");
|
1894 |
+
}
|
1895 |
};';
|
1896 |
wppa_add_inline_script( 'wppa-admin', $the_js );
|
1897 |
|
|
|
|
|
1898 |
wppa_echo( $result );
|
1899 |
|
1900 |
// The table of existing albums
|
wppa-common-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
-
* Version 8.1.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -1104,6 +1104,9 @@ global $wppa;
|
|
1104 |
return;
|
1105 |
}
|
1106 |
|
|
|
|
|
|
|
1107 |
// Reload home?
|
1108 |
if ( $reload == 'home' ) {
|
1109 |
echo '
|
2 |
/* wppa-common-functions.php
|
3 |
*
|
4 |
* Functions used in admin and in themes
|
5 |
+
* Version 8.1.10.001
|
6 |
*
|
7 |
*/
|
8 |
|
1104 |
return;
|
1105 |
}
|
1106 |
|
1107 |
+
// Sanitize message
|
1108 |
+
$msg = wppa_echo( $msg, false, false, true );
|
1109 |
+
|
1110 |
// Reload home?
|
1111 |
if ( $reload == 'home' ) {
|
1112 |
echo '
|
wppa-edit-sequence.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -18,7 +18,7 @@ function _wppa_edit_sequence() {
|
|
18 |
<div class="wrap">
|
19 |
|
20 |
<img id="icon-photos" src="' . $iconurl . '" />
|
21 |
-
<h1>' . esc_html__( 'Edit
|
22 |
<span style="font-size:0.5em">' . esc_html( __( 'A subset of Album Admin page', 'wp-photo-album-plus' ) ) . '</span>
|
23 |
</h1>
|
24 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains the admin menu and startups the admin pages
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
18 |
<div class="wrap">
|
19 |
|
20 |
<img id="icon-photos" src="' . $iconurl . '" />
|
21 |
+
<h1>' . esc_html__( 'Edit Photo Sequence', 'wp-photo-album-plus' ) . '
|
22 |
<span style="font-size:0.5em">' . esc_html( __( 'A subset of Album Admin page', 'wp-photo-album-plus' ) ) . '</span>
|
23 |
</h1>
|
24 |
|
wppa-exif-iptc-common.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* exif and iptc common functions
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -238,7 +238,7 @@ global $wppa_exif_error_output;
|
|
238 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
239 |
}
|
240 |
}
|
241 |
-
|
242 |
|
243 |
case 'E#0002': // CanonFocalLength / DeviceType
|
244 |
if ( $brand == 'SAMSUNG' ) { // DeviceType
|
@@ -248,7 +248,7 @@ global $wppa_exif_error_output;
|
|
248 |
case 0x3000: $result = 'HXM Video Camera'; break;
|
249 |
case 0x12000: $result = 'Cell Phone'; break;
|
250 |
case 0x300000: $result = 'SMX Video Camera'; break;
|
251 |
-
default: $result =
|
252 |
}
|
253 |
}
|
254 |
if ( $brand == 'CANON' ) { // CanonFocalLength
|
@@ -274,7 +274,7 @@ global $wppa_exif_error_output;
|
|
274 |
}
|
275 |
|
276 |
}
|
277 |
-
|
278 |
|
279 |
case 'E#0003': // CanonFlashInfo? / SamsungModelID
|
280 |
if ( $brand == 'CANON' ) { // CanonFlashInfo?
|
@@ -326,7 +326,7 @@ global $wppa_exif_error_output;
|
|
326 |
default: $result = '?';
|
327 |
}
|
328 |
}
|
329 |
-
|
330 |
|
331 |
case 'E#0004': // CanonShotInfo / Quality (Nikon)
|
332 |
case 'E#0005': // CanonPanorama / WhiteBalance (Nikon)
|
@@ -337,22 +337,22 @@ global $wppa_exif_error_output;
|
|
337 |
case 'E#000A': // UnknownD30 (Canon)
|
338 |
case 'E#000B': // WhiteBalanceFineTune (Nikon)
|
339 |
case 'E#000C': // SerialNumber (Canon) / WB_RBLevels (Nikon)
|
340 |
-
|
341 |
|
342 |
case 'E#000D': // CanonCameraInfo / ProgramShift (Nikon)
|
343 |
if ( $brand == 'CANON' ) {
|
344 |
str_replace( 'CanonCanon', 'Canon', $result );
|
345 |
}
|
346 |
-
|
347 |
|
348 |
case 'E#000E': // CanonFileLength / ExposureDifference (Nikon)
|
349 |
if ( $brand == 'CANON' ) {
|
350 |
$result .= ' bytes.';
|
351 |
}
|
352 |
-
|
353 |
|
354 |
case 'E#000F': // CustomFunctions (Canon) / ISOSelection (Nikon)
|
355 |
-
|
356 |
|
357 |
case 'E#0010': // CanonModelID (Canon) / DataDump (Nikon)
|
358 |
if ( $brand == 'CANON' ) { // CanonModelID (Canon)
|
@@ -684,7 +684,7 @@ global $wppa_exif_error_output;
|
|
684 |
if ( $brand == 'NIKON' ) { // DataDump (Nikon)
|
685 |
$result = $data;
|
686 |
}
|
687 |
-
|
688 |
|
689 |
case 'E#0011': // MovieInfo / OrientationInfo
|
690 |
if ( $brand == 'SAMSUNG' ) { // OrientationInfo
|
@@ -699,7 +699,7 @@ global $wppa_exif_error_output;
|
|
699 |
|
700 |
$result = ( $x / $y ) . ' ' . __( 'degrees', 'wp-photo-album-plus' );
|
701 |
}
|
702 |
-
|
703 |
|
704 |
case 'E#0012': // CanonAFInfo
|
705 |
if ( $brand == 'CANON' ) {
|
@@ -723,10 +723,10 @@ global $wppa_exif_error_output;
|
|
723 |
$result = trim( $result, ', ' );
|
724 |
}
|
725 |
}
|
726 |
-
|
727 |
|
728 |
case 'E#0013': // ThumbnailImageValidArea
|
729 |
-
|
730 |
|
731 |
case 'E#0015': // SerialNumberFormat
|
732 |
|
@@ -739,16 +739,16 @@ global $wppa_exif_error_output;
|
|
739 |
case 'a0000000': $result = __( 'Format 2', 'wp-photo-album-plus' ); break;
|
740 |
default: $result = __( 'undefined', 'wp-photo-album-plus' );
|
741 |
}
|
742 |
-
|
743 |
default:
|
744 |
$result = $data;
|
745 |
-
|
746 |
}
|
747 |
break;
|
748 |
|
749 |
case 'E#001A': // SuperMacro
|
750 |
case 'E#001C': // DateStampMode
|
751 |
-
|
752 |
|
753 |
case 'E#001D': // MyColors
|
754 |
/*
|
@@ -768,13 +768,12 @@ global $wppa_exif_error_output;
|
|
768 |
14 = Sepia
|
769 |
15 = B&W
|
770 |
*/
|
771 |
-
|
772 |
|
773 |
case 'E#001E': // FirmwareRevision (Canon) / ColorSpace (Nikon)
|
774 |
switch( $brand ) {
|
775 |
case 'CANON':
|
776 |
$result = $data;
|
777 |
-
return $result;
|
778 |
break;
|
779 |
case 'NIKON':
|
780 |
switch( $data ) {
|
@@ -782,11 +781,10 @@ global $wppa_exif_error_output;
|
|
782 |
case 2: $result = 'Adobe RGB'; break;
|
783 |
default: $result = $data;
|
784 |
}
|
785 |
-
return $result;
|
786 |
break;
|
787 |
default:
|
788 |
$result = $data;
|
789 |
-
|
790 |
}
|
791 |
break;
|
792 |
|
@@ -805,7 +803,6 @@ global $wppa_exif_error_output;
|
|
805 |
case 7: $result = __( 'Various', 'wp-photo-album-plus' ); break;
|
806 |
default: $result = $data;
|
807 |
}
|
808 |
-
return $result;
|
809 |
break;
|
810 |
case 'NIKON':
|
811 |
switch( $data ) {
|
@@ -813,12 +810,12 @@ global $wppa_exif_error_output;
|
|
813 |
case 1: $result = __( 'On', 'wp-photo-album-plus' ); break;
|
814 |
default: $result = $data;
|
815 |
}
|
816 |
-
|
817 |
default:
|
818 |
$result = $data;
|
819 |
-
|
820 |
}
|
821 |
-
|
822 |
|
823 |
case 'E#0023': // Categories
|
824 |
if ( $brand == 'CANON' ) {
|
@@ -840,11 +837,11 @@ global $wppa_exif_error_output;
|
|
840 |
}
|
841 |
}
|
842 |
}
|
843 |
-
|
844 |
|
845 |
case 'E#0024': // FaceDetect1
|
846 |
case 'E#0025': // FaceDetect2
|
847 |
-
|
848 |
|
849 |
case 'E#0026': // CanonAFInfo2
|
850 |
case 'E#003C': // CanonAFInfo3
|
@@ -884,7 +881,7 @@ global $wppa_exif_error_output;
|
|
884 |
$result = trim( $result, ', ' );
|
885 |
}
|
886 |
}
|
887 |
-
|
888 |
|
889 |
case 'E#0027': // ContrastInfo
|
890 |
/*
|
@@ -895,7 +892,7 @@ global $wppa_exif_error_output;
|
|
895 |
*/
|
896 |
case 'E#0028': // ImageUniqueID
|
897 |
case 'E#002F': // FaceDetect3
|
898 |
-
|
899 |
|
900 |
case 'E#0035': // TimeInfo
|
901 |
if ( $brand == 'CANON' && is_array( $data_arr ) && count( $data_arr ) == 4 ) {
|
@@ -945,10 +942,10 @@ global $wppa_exif_error_output;
|
|
945 |
elseif( $data_arr[3] == 60 ) $result .= 'On';
|
946 |
else $result .= '?';
|
947 |
}
|
948 |
-
|
949 |
|
950 |
// case 'E#003C': // AFInfo3 // See E#0026
|
951 |
-
//
|
952 |
|
953 |
case 'E#0081': // RawDataOffset
|
954 |
case 'E#0083': // OriginalDecisionDataOffset
|
@@ -963,7 +960,7 @@ global $wppa_exif_error_output;
|
|
963 |
case 'E#0098': // CropInfo
|
964 |
case 'E#0099': // CustomFunctions2
|
965 |
$result = $data;
|
966 |
-
|
967 |
|
968 |
case 'E#009A': // AspectInfo
|
969 |
$result = $data;
|
@@ -1001,7 +998,7 @@ global $wppa_exif_error_output;
|
|
1001 |
$result = trim( $result, ', ' );
|
1002 |
}
|
1003 |
}
|
1004 |
-
|
1005 |
|
1006 |
case 'E#00A0': // ProcessingInfo
|
1007 |
case 'E#00A1': // ToneCurveTable
|
@@ -1021,7 +1018,6 @@ global $wppa_exif_error_output;
|
|
1021 |
case 'E#00E0': // SensorInfo
|
1022 |
|
1023 |
$result = $data;
|
1024 |
-
return $result;
|
1025 |
break;
|
1026 |
|
1027 |
case 'E#00FE': // SubfileType (called NewSubfileType by the TIFF specification)
|
@@ -1041,7 +1037,7 @@ global $wppa_exif_error_output;
|
|
1041 |
case 0xffffffff: $result = __( 'invalid', 'wp-photo-album-plus' ); break;
|
1042 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1043 |
}
|
1044 |
-
|
1045 |
|
1046 |
case 'E#00FF': // OldSubfileType (called SubfileType by the TIFF specification)
|
1047 |
|
@@ -1055,7 +1051,7 @@ global $wppa_exif_error_output;
|
|
1055 |
case 3: $result = __( 'Single page of multi-page image', 'wp-photo-album-plus' ); break;
|
1056 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1057 |
}
|
1058 |
-
|
1059 |
|
1060 |
case 'E#0100': // Image width (pixels), Short or long, 1 item
|
1061 |
case 'E#0101': // Image length (pixels), Short or long, 1 item
|
@@ -1065,7 +1061,7 @@ global $wppa_exif_error_output;
|
|
1065 |
}
|
1066 |
|
1067 |
$result = $data . ' ' . __( 'px.', 'wp-photo-album-plus' );
|
1068 |
-
|
1069 |
break;
|
1070 |
|
1071 |
case 'E#0106': // PhotometricInterpretation
|
@@ -1089,7 +1085,7 @@ global $wppa_exif_error_output;
|
|
1089 |
case 34892: $result = __( 'Linear Raw', 'wp-photo-album-plus' ); break;
|
1090 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1091 |
}
|
1092 |
-
|
1093 |
|
1094 |
case 'E#0107': // Thresholding
|
1095 |
|
@@ -1101,7 +1097,7 @@ global $wppa_exif_error_output;
|
|
1101 |
case 3: $result = __( 'Randomized dither', 'wp-photo-album-plus' ); break;
|
1102 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1103 |
}
|
1104 |
-
|
1105 |
|
1106 |
case 'E#010A': // FillOrder
|
1107 |
|
@@ -1112,7 +1108,7 @@ global $wppa_exif_error_output;
|
|
1112 |
case 2: $result = __( 'Reversed', 'wp-photo-album-plus' ); break;
|
1113 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1114 |
}
|
1115 |
-
|
1116 |
|
1117 |
case 'E#0112': // Orientation
|
1118 |
|
@@ -1129,7 +1125,7 @@ global $wppa_exif_error_output;
|
|
1129 |
case 8: $result = __( 'Rotate 270 CW', 'wp-photo-album-plus' ); break;
|
1130 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1131 |
}
|
1132 |
-
|
1133 |
|
1134 |
case 'E#011A': // XResolution
|
1135 |
case 'E#011B': // YResolution
|
@@ -1144,7 +1140,6 @@ global $wppa_exif_error_output;
|
|
1144 |
$y = $temp[1];
|
1145 |
|
1146 |
$result = ( $x / $y );
|
1147 |
-
return $result;
|
1148 |
break;
|
1149 |
|
1150 |
case 'E#011C': // PlanarConfiguration
|
@@ -1156,7 +1151,6 @@ global $wppa_exif_error_output;
|
|
1156 |
case 2: $result = __( 'Planar', 'wp-photo-album-plus' ); break;
|
1157 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1158 |
}
|
1159 |
-
return $result;
|
1160 |
break;
|
1161 |
|
1162 |
case 'E#0122': // GrayResponseUnit
|
@@ -1171,7 +1165,6 @@ global $wppa_exif_error_output;
|
|
1171 |
case 5: $result = '1e-06'; break;
|
1172 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1173 |
}
|
1174 |
-
return $result;
|
1175 |
break;
|
1176 |
|
1177 |
case 'E#0124': // T4Options
|
@@ -1182,13 +1175,11 @@ global $wppa_exif_error_output;
|
|
1182 |
if ( $data & 0x0004 ) $result .= __( 'Fill bits added', 'wp-photo-album-plus' );
|
1183 |
$result = trim( $result );
|
1184 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1185 |
-
return $result;
|
1186 |
break;
|
1187 |
|
1188 |
case 'E#0125': // T6Options
|
1189 |
if ( $data & 0x0001 ) $result = __( 'Uncompressed', 'wp-photo-album-plus' );
|
1190 |
else $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1191 |
-
return $result;
|
1192 |
break;
|
1193 |
|
1194 |
case 'E#0128': // Resolution unit
|
@@ -1200,7 +1191,6 @@ global $wppa_exif_error_output;
|
|
1200 |
case 3: $result = __( 'centimeters', 'wp-photo-album-plus' ); break;
|
1201 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1202 |
}
|
1203 |
-
return $result;
|
1204 |
break;
|
1205 |
|
1206 |
case 'E#013D': // Predictor
|
@@ -1212,7 +1202,6 @@ global $wppa_exif_error_output;
|
|
1212 |
case 2: $result = __( 'Horizontal differencing', 'wp-photo-album-plus' ); break;
|
1213 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1214 |
}
|
1215 |
-
return $result;
|
1216 |
break;
|
1217 |
|
1218 |
case 'E#0147': // CleanFaxData
|
@@ -1225,7 +1214,6 @@ global $wppa_exif_error_output;
|
|
1225 |
case 2: $result = __( 'Unclean', 'wp-photo-album-plus' ); break;
|
1226 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1227 |
}
|
1228 |
-
return $result;
|
1229 |
break;
|
1230 |
|
1231 |
case 'E#014C': // InkSet
|
@@ -1237,7 +1225,6 @@ global $wppa_exif_error_output;
|
|
1237 |
case 2: $result = __( 'Not CMYK', 'wp-photo-album-plus' ); break;
|
1238 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1239 |
}
|
1240 |
-
return $result;
|
1241 |
break;
|
1242 |
|
1243 |
case 'E#0152': // ExtraSamples
|
@@ -1250,7 +1237,6 @@ global $wppa_exif_error_output;
|
|
1250 |
case 2: $result = __( 'Unassociated Alpha', 'wp-photo-album-plus' ); break;
|
1251 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1252 |
}
|
1253 |
-
return $result;
|
1254 |
break;
|
1255 |
|
1256 |
case 'E#0153': // SampleFormat
|
@@ -1266,7 +1252,6 @@ global $wppa_exif_error_output;
|
|
1266 |
case 6: $result = __( 'Complex float', 'wp-photo-album-plus' ); break;
|
1267 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1268 |
}
|
1269 |
-
return $result;
|
1270 |
break;
|
1271 |
|
1272 |
case 'E#015A': // Indexed
|
@@ -1278,7 +1263,6 @@ global $wppa_exif_error_output;
|
|
1278 |
case 1: $result = __( 'Indexed', 'wp-photo-album-plus' ); break;
|
1279 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1280 |
}
|
1281 |
-
return $result;
|
1282 |
break;
|
1283 |
|
1284 |
case 'E#015F': // OPIProxy
|
@@ -1290,7 +1274,6 @@ global $wppa_exif_error_output;
|
|
1290 |
case 1: $result = __( 'Higher resolution image exists', 'wp-photo-album-plus' ); break;
|
1291 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1292 |
}
|
1293 |
-
return $result;
|
1294 |
break;
|
1295 |
|
1296 |
case 'E#0191': // ProfileType
|
@@ -1302,7 +1285,6 @@ global $wppa_exif_error_output;
|
|
1302 |
case 1: $result = __( 'Group 3 FAX', 'wp-photo-album-plus' ); break;
|
1303 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1304 |
}
|
1305 |
-
return $result;
|
1306 |
break;
|
1307 |
|
1308 |
case 'E#0192': // FaxProfile
|
@@ -1321,7 +1303,6 @@ global $wppa_exif_error_output;
|
|
1321 |
case 255: $result = __( 'Multi Profiles', 'wp-photo-album-plus' ); break;
|
1322 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1323 |
}
|
1324 |
-
return $result;
|
1325 |
break;
|
1326 |
|
1327 |
case 'E#0193': // CodingMethods
|
@@ -1350,7 +1331,6 @@ global $wppa_exif_error_output;
|
|
1350 |
}
|
1351 |
$result = trim( $result, ', ' );
|
1352 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1353 |
-
return $result;
|
1354 |
break;
|
1355 |
|
1356 |
case 'E#A210': // FocalPlaneResolutionUnit
|
@@ -1362,7 +1342,6 @@ global $wppa_exif_error_output;
|
|
1362 |
case 3: $result = __( 'centimeters', 'wp-photo-album-plus' ); break;
|
1363 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1364 |
}
|
1365 |
-
return $result;
|
1366 |
break;
|
1367 |
|
1368 |
case 'E#0212': // YCbCrSubSampling
|
@@ -1378,7 +1357,6 @@ global $wppa_exif_error_output;
|
|
1378 |
'4 2' = YCbCr4:1:0 (4 2)
|
1379 |
*/
|
1380 |
$result = $data;
|
1381 |
-
return $result;
|
1382 |
break;
|
1383 |
|
1384 |
case 'E#0213': // YCbCrPositioning
|
@@ -1395,8 +1373,6 @@ global $wppa_exif_error_output;
|
|
1395 |
default:
|
1396 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
1397 |
}
|
1398 |
-
|
1399 |
-
return $result;
|
1400 |
break;
|
1401 |
|
1402 |
case 'E#4001': // ColorData
|
@@ -1405,7 +1381,6 @@ global $wppa_exif_error_output;
|
|
1405 |
case 'E#4005': // Flavor?
|
1406 |
|
1407 |
$result = $data;
|
1408 |
-
return $result;
|
1409 |
break;
|
1410 |
|
1411 |
case 'E#4008': // PictureStyleUserDef
|
@@ -1443,7 +1418,6 @@ global $wppa_exif_error_output;
|
|
1443 |
default:
|
1444 |
$result = $data;
|
1445 |
}
|
1446 |
-
return $result;
|
1447 |
break;
|
1448 |
|
1449 |
case 'E#4009': // PictureStylePC
|
@@ -1454,7 +1428,6 @@ global $wppa_exif_error_output;
|
|
1454 |
case 'E#4018': // LightingOpt
|
1455 |
case 'E#4019': // LensInfo
|
1456 |
$result = $data;
|
1457 |
-
return $result;
|
1458 |
break;
|
1459 |
|
1460 |
|
@@ -1472,12 +1445,11 @@ global $wppa_exif_error_output;
|
|
1472 |
case 8: $result = __( 'Monochrome', 'wp-photo-album-plus' ); break;
|
1473 |
default: $result = $data;
|
1474 |
}
|
1475 |
-
return $result;
|
1476 |
}
|
1477 |
else {
|
1478 |
$result = $data;
|
1479 |
}
|
1480 |
-
|
1481 |
|
1482 |
case 'E#4021': // MultiExp
|
1483 |
case 'E#4024': // FilterInfo
|
@@ -1485,7 +1457,6 @@ global $wppa_exif_error_output;
|
|
1485 |
case 'E#4028': // AFConfig
|
1486 |
|
1487 |
$result = $data;
|
1488 |
-
return $result;
|
1489 |
break;
|
1490 |
|
1491 |
case 'E#7000': // SonyRawFileType
|
@@ -1499,8 +1470,6 @@ global $wppa_exif_error_output;
|
|
1499 |
case 3: $result = __( 'Sony Lossless Compressed RAW', 'wp-photo-album-plus' ); break;
|
1500 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1501 |
}
|
1502 |
-
|
1503 |
-
return $result;
|
1504 |
break;
|
1505 |
|
1506 |
case 'E#829A': // Exposure time
|
@@ -1517,23 +1486,20 @@ global $wppa_exif_error_output;
|
|
1517 |
// 1 s.
|
1518 |
if ( $x / $y == 1 ) {
|
1519 |
$result = '1 s.';
|
1520 |
-
return $result;
|
1521 |
}
|
1522 |
|
1523 |
// Normal: 1/nn s.
|
1524 |
-
|
1525 |
$result = $data . ' s.';
|
1526 |
-
return $result;
|
1527 |
}
|
1528 |
|
1529 |
// 'nn/1'
|
1530 |
-
|
1531 |
$result = $x . ' s.';
|
1532 |
-
return $result;
|
1533 |
}
|
1534 |
|
1535 |
// Simplify nnn/mmm > 1
|
1536 |
-
|
1537 |
$result = sprintf( '%2.1f', $x / $y );
|
1538 |
if ( substr( $result, -2 ) == '.0' ) { // Remove trailing '.0'
|
1539 |
$result = substr( $result, 0, strlen( $result ) -2 ) . ' s.';
|
@@ -1567,7 +1533,6 @@ global $wppa_exif_error_output;
|
|
1567 |
}
|
1568 |
$result = substr( $z, 0, $i ) . ' s.';
|
1569 |
}
|
1570 |
-
return $result;
|
1571 |
break;
|
1572 |
|
1573 |
case 'E#829D': // F-Stop
|
@@ -1590,8 +1555,6 @@ global $wppa_exif_error_output;
|
|
1590 |
|
1591 |
// Valid meaningful data
|
1592 |
$result = 'f/' . ( round( 10 * $x / $y ) / 10 );
|
1593 |
-
|
1594 |
-
return $result;
|
1595 |
break;
|
1596 |
|
1597 |
case 'E#84E3': // RasterPadding
|
@@ -1606,7 +1569,6 @@ global $wppa_exif_error_output;
|
|
1606 |
case 10: $result = __( 'Long Sector', 'wp-photo-album-plus' ); break;
|
1607 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1608 |
}
|
1609 |
-
return $result;
|
1610 |
break;
|
1611 |
|
1612 |
case 'E#84E7': // ImageColorIndicator
|
@@ -1618,7 +1580,6 @@ global $wppa_exif_error_output;
|
|
1618 |
case 1: $result = __( 'Specified Image Color', 'wp-photo-album-plus' ); break;
|
1619 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1620 |
}
|
1621 |
-
return $result;
|
1622 |
break;
|
1623 |
|
1624 |
case 'E#84E8': // BackgroundColorIndicator
|
@@ -1630,7 +1591,6 @@ global $wppa_exif_error_output;
|
|
1630 |
case 1: $result = __( 'Specified Background Color', 'wp-photo-album-plus' ); break;
|
1631 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1632 |
}
|
1633 |
-
return $result;
|
1634 |
break;
|
1635 |
|
1636 |
case 'E#84EE': // HCUsage
|
@@ -1643,7 +1603,6 @@ global $wppa_exif_error_output;
|
|
1643 |
case 2: $result = __( 'Trap', 'wp-photo-album-plus' ); break;
|
1644 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1645 |
}
|
1646 |
-
return $result;
|
1647 |
break;
|
1648 |
|
1649 |
case 'E#877F': // TIFF_FXExtensions
|
@@ -1658,7 +1617,6 @@ global $wppa_exif_error_output;
|
|
1658 |
if ( $data & 0x10 ) $data .= __( 'JBIG2 Profile M', 'wp-photo-album-plus' ) . ', ';
|
1659 |
$result = trim( $result, ', ' );
|
1660 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1661 |
-
return $result;
|
1662 |
break;
|
1663 |
|
1664 |
case 'E#8780': // MultiProfiles
|
@@ -1679,7 +1637,6 @@ global $wppa_exif_error_output;
|
|
1679 |
if ( $data & 0x400 ) $data .= __( 'JBIG2 Profile M', 'wp-photo-album-plus' ) . ', ';
|
1680 |
$result = trim( $result, ', ' );
|
1681 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1682 |
-
return $result;
|
1683 |
break;
|
1684 |
|
1685 |
case 'E#8822': // Exposure program
|
@@ -1699,7 +1656,6 @@ global $wppa_exif_error_output;
|
|
1699 |
case '9': $result = __('Bulb', 'wp-photo-album-plus' ); break;
|
1700 |
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
1701 |
}
|
1702 |
-
return $result;
|
1703 |
break;
|
1704 |
|
1705 |
case 'E#8830': // SensitivityType
|
@@ -1717,7 +1673,6 @@ global $wppa_exif_error_output;
|
|
1717 |
case '7': $result = __('Standard Output Sensitivity, Recommended Exposure Index and ISO Speed', 'wp-photo-album-plus' ); break;
|
1718 |
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
1719 |
}
|
1720 |
-
return $result;
|
1721 |
break;
|
1722 |
|
1723 |
case 'E#9101': // ComponentsConfiguration
|
@@ -1734,7 +1689,6 @@ global $wppa_exif_error_output;
|
|
1734 |
case '6': $result = 'B'; break;
|
1735 |
default: $result = '?';
|
1736 |
}
|
1737 |
-
return $result;
|
1738 |
break;
|
1739 |
|
1740 |
case 'E#9102': // CompressedBitsPerPixel
|
@@ -1748,7 +1702,6 @@ global $wppa_exif_error_output;
|
|
1748 |
else {
|
1749 |
$result = $data;
|
1750 |
}
|
1751 |
-
return $result;
|
1752 |
break;
|
1753 |
|
1754 |
case 'E#9201': // Shutter speed value
|
@@ -1761,7 +1714,6 @@ global $wppa_exif_error_output;
|
|
1761 |
$y = $temp[1];
|
1762 |
|
1763 |
$result = round( 10 * $x / $y ) / 10;
|
1764 |
-
return $result;
|
1765 |
break;
|
1766 |
|
1767 |
case 'E#9202': // Aperture value
|
@@ -1777,8 +1729,6 @@ global $wppa_exif_error_output;
|
|
1777 |
$y = $temp[1];
|
1778 |
|
1779 |
$result = round( 10 * $x / $y ) / 10;
|
1780 |
-
|
1781 |
-
return $result;
|
1782 |
break;
|
1783 |
|
1784 |
case 'E#9204': // ExposureBiasValue
|
@@ -1793,7 +1743,6 @@ global $wppa_exif_error_output;
|
|
1793 |
$y = $t[1];
|
1794 |
|
1795 |
$result = sprintf( '%5.2f EV', $x/$y );
|
1796 |
-
return $result;
|
1797 |
break;
|
1798 |
|
1799 |
case 'E#9205': // Max aperture value
|
@@ -1809,8 +1758,6 @@ global $wppa_exif_error_output;
|
|
1809 |
$y = $temp[1];
|
1810 |
|
1811 |
$result = round( 10 * $x / $y ) / 10;
|
1812 |
-
|
1813 |
-
return $result;
|
1814 |
break;
|
1815 |
|
1816 |
case 'E#9206': // Subject distance
|
@@ -1839,12 +1786,8 @@ global $wppa_exif_error_output;
|
|
1839 |
$result .= ' m.';
|
1840 |
}
|
1841 |
}
|
1842 |
-
|
1843 |
-
return $result;
|
1844 |
break;
|
1845 |
|
1846 |
-
|
1847 |
-
|
1848 |
case 'E#9207': // Metering mode
|
1849 |
switch ( $data ) {
|
1850 |
case '1': $result = __('Average', 'wp-photo-album-plus' ); break;
|
@@ -1856,7 +1799,6 @@ global $wppa_exif_error_output;
|
|
1856 |
case '255': $result = __('Other', 'wp-photo-album-plus' ); break;
|
1857 |
default: $result = __('reserved', 'wp-photo-album-plus' );
|
1858 |
}
|
1859 |
-
return $result;
|
1860 |
break;
|
1861 |
|
1862 |
case 'E#9208': // LghtSource
|
@@ -1884,7 +1826,6 @@ global $wppa_exif_error_output;
|
|
1884 |
case '255': $result = __('other light source', 'wp-photo-album-plus' ); break;
|
1885 |
default: $result = __('reserved', 'wp-photo-album-plus' ); break;
|
1886 |
}
|
1887 |
-
return $result;
|
1888 |
break;
|
1889 |
|
1890 |
case 'E#9209': // Flash
|
@@ -1918,8 +1859,6 @@ global $wppa_exif_error_output;
|
|
1918 |
case '95': $result = __('Auto, Fired, Red-eye reduction, Return detected', 'wp-photo-album-plus' ); break;
|
1919 |
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
1920 |
}
|
1921 |
-
|
1922 |
-
return $result;
|
1923 |
break;
|
1924 |
|
1925 |
case 'E#9210': // FocalPlaneResolutionUnit
|
@@ -1932,8 +1871,6 @@ global $wppa_exif_error_output;
|
|
1932 |
case 5: $result = 'μm'; break;
|
1933 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1934 |
}
|
1935 |
-
|
1936 |
-
return $result;
|
1937 |
break;
|
1938 |
|
1939 |
case 'E#920A': // Focal length
|
@@ -1954,7 +1891,6 @@ global $wppa_exif_error_output;
|
|
1954 |
else {
|
1955 |
$result = round( $x / $y ) . ' mm.';
|
1956 |
}
|
1957 |
-
return $result;
|
1958 |
break;
|
1959 |
|
1960 |
case 'E#9212': // SecurityClassification
|
@@ -1967,8 +1903,6 @@ global $wppa_exif_error_output;
|
|
1967 |
case 'U': $result = __( 'Unclassified', 'wp-photo-album-plus' ); break;
|
1968 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1969 |
}
|
1970 |
-
|
1971 |
-
return $result;
|
1972 |
break;
|
1973 |
|
1974 |
case 'E#9217': // SensingMethod
|
@@ -1986,8 +1920,6 @@ global $wppa_exif_error_output;
|
|
1986 |
case 8: $result = __( 'Color sequential linear', 'wp-photo-album-plus' ); break;
|
1987 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1988 |
}
|
1989 |
-
|
1990 |
-
return $result;
|
1991 |
break;
|
1992 |
|
1993 |
case 'E#A001': // ColorSpace
|
@@ -2002,7 +1934,6 @@ global $wppa_exif_error_output;
|
|
2002 |
case 0xFFFF: $result = __( 'Uncalibrated', 'wp-photo-album-plus' ); break;
|
2003 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2004 |
}
|
2005 |
-
return $result;
|
2006 |
break;
|
2007 |
|
2008 |
case 'E#A002': // PixelXDimension
|
@@ -2032,8 +1963,6 @@ global $wppa_exif_error_output;
|
|
2032 |
case 21: $result = 'Samsung NX 300mm F2.8 ED OIS'; break;
|
2033 |
default: $result = $data;
|
2034 |
}
|
2035 |
-
|
2036 |
-
return $result;
|
2037 |
break;
|
2038 |
|
2039 |
default:
|
@@ -2042,7 +1971,6 @@ global $wppa_exif_error_output;
|
|
2042 |
}
|
2043 |
|
2044 |
$result = $data . ' px.';
|
2045 |
-
return $result;
|
2046 |
}
|
2047 |
break;
|
2048 |
|
@@ -2056,14 +1984,11 @@ global $wppa_exif_error_output;
|
|
2056 |
case 1: $result = 'Adobe RGB'; break;
|
2057 |
default: $result = $data;
|
2058 |
}
|
2059 |
-
|
2060 |
-
return $result;
|
2061 |
break;
|
2062 |
|
2063 |
default:
|
2064 |
|
2065 |
$result = $data;
|
2066 |
-
return $result;
|
2067 |
}
|
2068 |
break;
|
2069 |
|
@@ -2077,14 +2002,11 @@ global $wppa_exif_error_output;
|
|
2077 |
case 1: $result = __( 'On', 'wp-photo-album-plus' ); break;
|
2078 |
default: $result = $data;
|
2079 |
}
|
2080 |
-
|
2081 |
-
return $result;
|
2082 |
break;
|
2083 |
|
2084 |
default:
|
2085 |
|
2086 |
$result = $data;
|
2087 |
-
return $result;
|
2088 |
}
|
2089 |
break;
|
2090 |
|
@@ -2101,7 +2023,6 @@ global $wppa_exif_error_output;
|
|
2101 |
$y = $temp[1];
|
2102 |
|
2103 |
$result = round( $x / $y );
|
2104 |
-
return $result;
|
2105 |
break;
|
2106 |
|
2107 |
case 'E#A210': // FocalPlaneResolutionUnit
|
@@ -2114,8 +2035,6 @@ global $wppa_exif_error_output;
|
|
2114 |
case 5: $result = 'μm'; break;
|
2115 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
2116 |
}
|
2117 |
-
|
2118 |
-
return $result;
|
2119 |
break;
|
2120 |
|
2121 |
case 'E#A217': // SensingMethod
|
@@ -2149,8 +2068,6 @@ global $wppa_exif_error_output;
|
|
2149 |
default:
|
2150 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2151 |
}
|
2152 |
-
|
2153 |
-
return $result;
|
2154 |
break;
|
2155 |
|
2156 |
case 'E#A300': // FileSource
|
@@ -2162,7 +2079,6 @@ global $wppa_exif_error_output;
|
|
2162 |
case "\x03\x00\x00\x00": $result = __( 'Sigma Digital Camera', 'wp-photo-album-plus' ); break;
|
2163 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2164 |
}
|
2165 |
-
return $result;
|
2166 |
break;
|
2167 |
|
2168 |
case 'E#A401': // CustomRendered
|
@@ -2177,7 +2093,6 @@ global $wppa_exif_error_output;
|
|
2177 |
case 8: $result = __( 'Portrait', 'wp-photo-album-plus' ); break;
|
2178 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2179 |
}
|
2180 |
-
return $result;
|
2181 |
break;
|
2182 |
|
2183 |
case 'E#A402': // ExposureMode
|
@@ -2197,8 +2112,6 @@ global $wppa_exif_error_output;
|
|
2197 |
default:
|
2198 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2199 |
}
|
2200 |
-
|
2201 |
-
return $result;
|
2202 |
break;
|
2203 |
|
2204 |
case 'E#A403': // WhiteBalance
|
@@ -2215,8 +2128,6 @@ global $wppa_exif_error_output;
|
|
2215 |
default:
|
2216 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2217 |
}
|
2218 |
-
|
2219 |
-
return $result;
|
2220 |
break;
|
2221 |
|
2222 |
case 'E#A404': // DigitalZoomRatio
|
@@ -2236,7 +2147,6 @@ global $wppa_exif_error_output;
|
|
2236 |
}
|
2237 |
|
2238 |
$result = $data;
|
2239 |
-
return $result;
|
2240 |
break;
|
2241 |
|
2242 |
case 'E#A405': // FocalLengthIn35mmFilm
|
@@ -2246,7 +2156,6 @@ global $wppa_exif_error_output;
|
|
2246 |
}
|
2247 |
|
2248 |
$result = $data . ' mm.';
|
2249 |
-
return $result;
|
2250 |
break;
|
2251 |
|
2252 |
case 'E#A406': // SceneCaptureType
|
@@ -2268,8 +2177,6 @@ global $wppa_exif_error_output;
|
|
2268 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2269 |
break;
|
2270 |
}
|
2271 |
-
|
2272 |
-
return $result;
|
2273 |
break;
|
2274 |
|
2275 |
case 'E#A407': // GainControl
|
@@ -2292,8 +2199,6 @@ global $wppa_exif_error_output;
|
|
2292 |
default:
|
2293 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2294 |
}
|
2295 |
-
|
2296 |
-
return $result;
|
2297 |
break;
|
2298 |
|
2299 |
case 'E#A408': // Contrast
|
@@ -2315,8 +2220,6 @@ global $wppa_exif_error_output;
|
|
2315 |
default:
|
2316 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2317 |
}
|
2318 |
-
|
2319 |
-
return $result;
|
2320 |
break;
|
2321 |
|
2322 |
case 'E#A409': // Saturation
|
@@ -2338,8 +2241,6 @@ global $wppa_exif_error_output;
|
|
2338 |
default:
|
2339 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2340 |
}
|
2341 |
-
|
2342 |
-
return $result;
|
2343 |
break;
|
2344 |
|
2345 |
case 'E#A40A': // Sharpness
|
@@ -2361,8 +2262,6 @@ global $wppa_exif_error_output;
|
|
2361 |
default:
|
2362 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2363 |
}
|
2364 |
-
|
2365 |
-
return $result;
|
2366 |
break;
|
2367 |
|
2368 |
case 'E#A40C': // SubjectDistanceRange
|
@@ -2376,7 +2275,6 @@ global $wppa_exif_error_output;
|
|
2376 |
case 3: $result = __( 'Distant view', 'wp-photo-album-plus' ); break;
|
2377 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2378 |
}
|
2379 |
-
return $result;
|
2380 |
break;
|
2381 |
|
2382 |
case 'E#BC01': // PixelFormat
|
@@ -2441,7 +2339,6 @@ global $wppa_exif_error_output;
|
|
2441 |
case 0x3f: $result = __( '32-bit Gray Fixed Point', 'wp-photo-album-plus' ); break;
|
2442 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2443 |
}
|
2444 |
-
return $result;
|
2445 |
break;
|
2446 |
|
2447 |
case 'E#BC02': // Transformation
|
@@ -2459,7 +2356,7 @@ global $wppa_exif_error_output;
|
|
2459 |
case 7: $result = __( 'Rotate 270 CW', 'wp-photo-album-plus' ); break;
|
2460 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2461 |
}
|
2462 |
-
|
2463 |
|
2464 |
case 'E#BC03': // Uncompressed
|
2465 |
|
@@ -2470,7 +2367,7 @@ global $wppa_exif_error_output;
|
|
2470 |
case 1: $result = __( 'Yes', 'wp-photo-album-plus' ); break;
|
2471 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2472 |
}
|
2473 |
-
|
2474 |
|
2475 |
case 'E#BC04': // ImageType
|
2476 |
|
@@ -2482,7 +2379,7 @@ global $wppa_exif_error_output;
|
|
2482 |
case 3: $result = __( 'Preview', 'wp-photo-album-plus' ) . ' ' . __( 'Page', 'wp-photo-album-plus' ); break;
|
2483 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2484 |
}
|
2485 |
-
|
2486 |
|
2487 |
/*
|
2488 |
0xbc80 ImageWidth
|
@@ -2507,7 +2404,7 @@ global $wppa_exif_error_output;
|
|
2507 |
case 3: $result = __( 'Highpass and LowPass Frequency Data Discarded', 'wp-photo-album-plus' ); break;
|
2508 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2509 |
}
|
2510 |
-
|
2511 |
|
2512 |
case 'E#BCC5': // AlphaDataDiscard
|
2513 |
|
@@ -2520,7 +2417,7 @@ global $wppa_exif_error_output;
|
|
2520 |
case 3: $result = __( 'Highpass and LowPass Frequency Data Discarded', 'wp-photo-album-plus' ); break;
|
2521 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2522 |
}
|
2523 |
-
|
2524 |
/*
|
2525 |
0xc427 OceScanjobDesc
|
2526 |
0xc428 OceApplicationSelector
|
@@ -2540,7 +2437,7 @@ global $wppa_exif_error_output;
|
|
2540 |
case 2: $result = __( 'Color', 'wp-photo-album-plus' ); break;
|
2541 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2542 |
}
|
2543 |
-
|
2544 |
|
2545 |
/*
|
2546 |
0xc5e0 CR2CFAPattern
|
@@ -2573,7 +2470,7 @@ global $wppa_exif_error_output;
|
|
2573 |
case 9: $result = __( 'Even rows offset down by 1/2 row, even columns offset right by 1/2 column', 'wp-photo-album-plus' ); break;
|
2574 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2575 |
}
|
2576 |
-
|
2577 |
|
2578 |
case 'E#C6FD': // ProfileEmbedPolicy
|
2579 |
|
@@ -2586,7 +2483,7 @@ global $wppa_exif_error_output;
|
|
2586 |
case 3: $result = __( 'No Restrictions', 'wp-photo-album-plus' ); break;
|
2587 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2588 |
}
|
2589 |
-
|
2590 |
|
2591 |
case 'E#C71A': // PreviewColorSpace
|
2592 |
|
@@ -2600,7 +2497,7 @@ global $wppa_exif_error_output;
|
|
2600 |
case 4: $result = __( 'ProPhoto RGB', 'wp-photo-album-plus' ); break;
|
2601 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2602 |
}
|
2603 |
-
|
2604 |
|
2605 |
case 'E#C7A3': // ProfileHueSatMapEncoding
|
2606 |
case 'E#C7A4': // ProfileLookTableEncoding
|
@@ -2612,7 +2509,7 @@ global $wppa_exif_error_output;
|
|
2612 |
case 1: $result = __( 'sRGB', 'wp-photo-album-plus' ); break;
|
2613 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2614 |
}
|
2615 |
-
|
2616 |
|
2617 |
case 'E#C7A6': // DefaultBlackRender
|
2618 |
|
@@ -2623,21 +2520,21 @@ global $wppa_exif_error_output;
|
|
2623 |
case 1: $result = __( 'None', 'wp-photo-album-plus' ); break;
|
2624 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2625 |
}
|
2626 |
-
|
2627 |
|
2628 |
|
2629 |
// FILE
|
2630 |
case 'F#0001': // FileName
|
2631 |
$result = $data;
|
2632 |
-
|
2633 |
|
2634 |
case 'F#0002': // FileDateTime
|
2635 |
$result = wppa_local_date( '', $data );
|
2636 |
-
|
2637 |
|
2638 |
case 'F#0003': // FileSize
|
2639 |
$result = $data . ' Bytes';
|
2640 |
-
|
2641 |
|
2642 |
case 'F#0004': // FileType
|
2643 |
|
@@ -2649,17 +2546,17 @@ global $wppa_exif_error_output;
|
|
2649 |
case 3: $result = 'png'; break;
|
2650 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2651 |
}
|
2652 |
-
|
2653 |
|
2654 |
case 'F#0005': // MimeType
|
2655 |
case 'F#0006': // SectionsFound
|
2656 |
$result = $data;
|
2657 |
-
|
2658 |
|
2659 |
// GPS
|
2660 |
case 'G#0000': // GPSVersionID int8u[4]
|
2661 |
$result = $data;
|
2662 |
-
|
2663 |
|
2664 |
case 'G#0001': // GPSLatitudeRef string[2]
|
2665 |
switch( $data ) {
|
@@ -2667,7 +2564,7 @@ global $wppa_exif_error_output;
|
|
2667 |
case 'S': $result = __( 'South', 'wp-photo-album-plus' ); break;
|
2668 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2669 |
}
|
2670 |
-
|
2671 |
|
2672 |
case 'G#0002': // GPSLatitude rational64u[3]
|
2673 |
for( $i = 0; $i < 3; $i++ ) {
|
@@ -2675,7 +2572,7 @@ global $wppa_exif_error_output;
|
|
2675 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2676 |
}
|
2677 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2678 |
-
|
2679 |
|
2680 |
case 'G#0003': // GPSLongitudeRef string[2]
|
2681 |
switch( $data ) {
|
@@ -2683,7 +2580,7 @@ global $wppa_exif_error_output;
|
|
2683 |
case 'W': $result = __( 'West', 'wp-photo-album-plus' ); break;
|
2684 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2685 |
}
|
2686 |
-
|
2687 |
|
2688 |
case 'G#0004': // GPSLongitude rational64u[3]
|
2689 |
for( $i = 0; $i < 3; $i++ ) {
|
@@ -2691,7 +2588,7 @@ global $wppa_exif_error_output;
|
|
2691 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2692 |
}
|
2693 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2694 |
-
|
2695 |
|
2696 |
case 'G#0005': // GPSAltitudeRef int8u
|
2697 |
switch( $data ) {
|
@@ -2699,12 +2596,12 @@ global $wppa_exif_error_output;
|
|
2699 |
case 1: $result = __( 'Below Sea Level', 'wp-photo-album-plus' ); break;
|
2700 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2701 |
}
|
2702 |
-
|
2703 |
|
2704 |
case 'G#0006': // GPSAltitude rational64u
|
2705 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2706 |
$result = wppa_simplify_rational( $data, true, 2 );
|
2707 |
-
|
2708 |
|
2709 |
case 'G#0007': // GPSTimeStamp rational64u[3] UTC time of GPS fix.
|
2710 |
for( $i = 0; $i < 3; $i++ ) {
|
@@ -2712,11 +2609,11 @@ global $wppa_exif_error_output;
|
|
2712 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2713 |
}
|
2714 |
$result = $data_arr[0] . ':' . $data_arr[1] . ':' . $data_arr[2];
|
2715 |
-
|
2716 |
|
2717 |
case 'G#0008': // GPSSatellites string
|
2718 |
$result = $data;
|
2719 |
-
|
2720 |
|
2721 |
case 'G#0009': // GPSStatus string[2]
|
2722 |
switch( $data ) {
|
@@ -2724,7 +2621,7 @@ global $wppa_exif_error_output;
|
|
2724 |
case 'V': $result = __( 'Measurement Void', 'wp-photo-album-plus' ); break;
|
2725 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2726 |
}
|
2727 |
-
|
2728 |
|
2729 |
case 'G#000A': // GPSMeasureMode string[2]
|
2730 |
switch( $data ) {
|
@@ -2732,12 +2629,12 @@ global $wppa_exif_error_output;
|
|
2732 |
case '3': $result = __( '3-Dimensional Measurement', 'wp-photo-album-plus' ); break;
|
2733 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2734 |
}
|
2735 |
-
|
2736 |
|
2737 |
case 'G#000B': // GPSDOP rational64u
|
2738 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2739 |
$result = wppa_simplify_rational( $data, true );
|
2740 |
-
|
2741 |
|
2742 |
case 'G#000C': // GPSSpeedRef string[2]
|
2743 |
switch( $data ) {
|
@@ -2746,12 +2643,12 @@ global $wppa_exif_error_output;
|
|
2746 |
case 'N': $result = __( 'knots', 'wp-photo-album-plus' ); break;
|
2747 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2748 |
}
|
2749 |
-
|
2750 |
|
2751 |
case 'G#000D': // GPSSpeed rational64u
|
2752 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2753 |
$result = wppa_simplify_rational( $data, true );
|
2754 |
-
|
2755 |
|
2756 |
case 'G#000E': // GPSTrackRef string[2]
|
2757 |
switch( $data ) {
|
@@ -2759,12 +2656,12 @@ global $wppa_exif_error_output;
|
|
2759 |
case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
|
2760 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2761 |
}
|
2762 |
-
|
2763 |
|
2764 |
case 'G#000F': // GPSTrack rational64u
|
2765 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2766 |
$result = wppa_simplify_rational( $data, true );
|
2767 |
-
|
2768 |
|
2769 |
case 'G#0010': // GPSImgDirectionRef string[2]
|
2770 |
switch( $data ) {
|
@@ -2772,16 +2669,16 @@ global $wppa_exif_error_output;
|
|
2772 |
case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
|
2773 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2774 |
}
|
2775 |
-
|
2776 |
|
2777 |
case 'G#0011': // GPSImgDirection rational64u
|
2778 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2779 |
$result = wppa_simplify_rational( $data, true );
|
2780 |
-
|
2781 |
|
2782 |
case 'G#0012': // GPSMapDatum string
|
2783 |
$result = $data;
|
2784 |
-
|
2785 |
|
2786 |
case 'G#0013': // GPSDestLatitudeRef string[2]
|
2787 |
switch( $data ) {
|
@@ -2789,7 +2686,7 @@ global $wppa_exif_error_output;
|
|
2789 |
case 'S': $result = __( 'South', 'wp-photo-album-plus' ); break;
|
2790 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2791 |
}
|
2792 |
-
|
2793 |
|
2794 |
case 'G#0014': // GPSDestLatitude rational64u[3]
|
2795 |
for( $i = 0; $i < 3; $i++ ) {
|
@@ -2797,7 +2694,7 @@ global $wppa_exif_error_output;
|
|
2797 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2798 |
}
|
2799 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2800 |
-
|
2801 |
|
2802 |
case 'G#0015': // GPSDestLongitudeRef string[2]
|
2803 |
switch( $data ) {
|
@@ -2805,7 +2702,7 @@ global $wppa_exif_error_output;
|
|
2805 |
case 'W': $result = __( 'West', 'wp-photo-album-plus' ); break;
|
2806 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2807 |
}
|
2808 |
-
|
2809 |
|
2810 |
case 'G#0016': // GPSDestLongitude rational64u[3]
|
2811 |
for( $i = 0; $i < 3; $i++ ) {
|
@@ -2813,7 +2710,7 @@ global $wppa_exif_error_output;
|
|
2813 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2814 |
}
|
2815 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2816 |
-
|
2817 |
|
2818 |
case 'G#0017': // GPSDestBearingRef string[2]
|
2819 |
switch( $data ) {
|
@@ -2821,12 +2718,12 @@ global $wppa_exif_error_output;
|
|
2821 |
case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
|
2822 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2823 |
}
|
2824 |
-
|
2825 |
|
2826 |
case 'G#0018': // GPSDestBearing rational64u
|
2827 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2828 |
$result = wppa_simplify_rational( $data, true );
|
2829 |
-
|
2830 |
|
2831 |
case 'G#0019': // GPSDestDistanceRef string[2]
|
2832 |
switch( $data ) {
|
@@ -2835,18 +2732,18 @@ global $wppa_exif_error_output;
|
|
2835 |
case 'N': $result = __( 'Nautical Miles', 'wp-photo-album-plus' ); break;
|
2836 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2837 |
}
|
2838 |
-
|
2839 |
|
2840 |
case 'G#001A': // GPSDestDistance rational64u
|
2841 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2842 |
$result = wppa_simplify_rational( $data, true );
|
2843 |
-
|
2844 |
|
2845 |
case 'G#001B': // GPSProcessingMethod undef
|
2846 |
case 'G#001C': // GPSAreaInformation undef
|
2847 |
case 'G#001D': // GPSDateStamp string[11]
|
2848 |
$result = $data;
|
2849 |
-
|
2850 |
|
2851 |
case 'G#001E': // GPSDifferential int16u
|
2852 |
switch( $data ) {
|
@@ -2854,18 +2751,18 @@ global $wppa_exif_error_output;
|
|
2854 |
case 1: $result = __( 'Differential Corrected', 'wp-photo-album-plus' ); break;
|
2855 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2856 |
}
|
2857 |
-
|
2858 |
|
2859 |
case 'G#001F': // GPSHPositioningError rational64u
|
2860 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2861 |
$result = wppa_simplify_rational( $data, true );
|
2862 |
-
|
2863 |
|
2864 |
|
2865 |
// Unformatted
|
2866 |
default:
|
2867 |
-
$result = $data;
|
2868 |
-
|
2869 |
}
|
2870 |
}
|
2871 |
|
@@ -2874,7 +2771,7 @@ global $wppa_exif_error_output;
|
|
2874 |
$result = '';
|
2875 |
}
|
2876 |
|
2877 |
-
return $result;
|
2878 |
}
|
2879 |
|
2880 |
function wppa_is_valid_rational( $data, $complain = true ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* exif and iptc common functions
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*
|
9 |
*/
|
238 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
239 |
}
|
240 |
}
|
241 |
+
break;
|
242 |
|
243 |
case 'E#0002': // CanonFocalLength / DeviceType
|
244 |
if ( $brand == 'SAMSUNG' ) { // DeviceType
|
248 |
case 0x3000: $result = 'HXM Video Camera'; break;
|
249 |
case 0x12000: $result = 'Cell Phone'; break;
|
250 |
case 0x300000: $result = 'SMX Video Camera'; break;
|
251 |
+
default: $result = '?';
|
252 |
}
|
253 |
}
|
254 |
if ( $brand == 'CANON' ) { // CanonFocalLength
|
274 |
}
|
275 |
|
276 |
}
|
277 |
+
break;
|
278 |
|
279 |
case 'E#0003': // CanonFlashInfo? / SamsungModelID
|
280 |
if ( $brand == 'CANON' ) { // CanonFlashInfo?
|
326 |
default: $result = '?';
|
327 |
}
|
328 |
}
|
329 |
+
break;
|
330 |
|
331 |
case 'E#0004': // CanonShotInfo / Quality (Nikon)
|
332 |
case 'E#0005': // CanonPanorama / WhiteBalance (Nikon)
|
337 |
case 'E#000A': // UnknownD30 (Canon)
|
338 |
case 'E#000B': // WhiteBalanceFineTune (Nikon)
|
339 |
case 'E#000C': // SerialNumber (Canon) / WB_RBLevels (Nikon)
|
340 |
+
break;
|
341 |
|
342 |
case 'E#000D': // CanonCameraInfo / ProgramShift (Nikon)
|
343 |
if ( $brand == 'CANON' ) {
|
344 |
str_replace( 'CanonCanon', 'Canon', $result );
|
345 |
}
|
346 |
+
break;
|
347 |
|
348 |
case 'E#000E': // CanonFileLength / ExposureDifference (Nikon)
|
349 |
if ( $brand == 'CANON' ) {
|
350 |
$result .= ' bytes.';
|
351 |
}
|
352 |
+
break;
|
353 |
|
354 |
case 'E#000F': // CustomFunctions (Canon) / ISOSelection (Nikon)
|
355 |
+
break;
|
356 |
|
357 |
case 'E#0010': // CanonModelID (Canon) / DataDump (Nikon)
|
358 |
if ( $brand == 'CANON' ) { // CanonModelID (Canon)
|
684 |
if ( $brand == 'NIKON' ) { // DataDump (Nikon)
|
685 |
$result = $data;
|
686 |
}
|
687 |
+
break;
|
688 |
|
689 |
case 'E#0011': // MovieInfo / OrientationInfo
|
690 |
if ( $brand == 'SAMSUNG' ) { // OrientationInfo
|
699 |
|
700 |
$result = ( $x / $y ) . ' ' . __( 'degrees', 'wp-photo-album-plus' );
|
701 |
}
|
702 |
+
break;
|
703 |
|
704 |
case 'E#0012': // CanonAFInfo
|
705 |
if ( $brand == 'CANON' ) {
|
723 |
$result = trim( $result, ', ' );
|
724 |
}
|
725 |
}
|
726 |
+
break;
|
727 |
|
728 |
case 'E#0013': // ThumbnailImageValidArea
|
729 |
+
break;
|
730 |
|
731 |
case 'E#0015': // SerialNumberFormat
|
732 |
|
739 |
case 'a0000000': $result = __( 'Format 2', 'wp-photo-album-plus' ); break;
|
740 |
default: $result = __( 'undefined', 'wp-photo-album-plus' );
|
741 |
}
|
742 |
+
break;
|
743 |
default:
|
744 |
$result = $data;
|
745 |
+
break;
|
746 |
}
|
747 |
break;
|
748 |
|
749 |
case 'E#001A': // SuperMacro
|
750 |
case 'E#001C': // DateStampMode
|
751 |
+
break;
|
752 |
|
753 |
case 'E#001D': // MyColors
|
754 |
/*
|
768 |
14 = Sepia
|
769 |
15 = B&W
|
770 |
*/
|
771 |
+
break;
|
772 |
|
773 |
case 'E#001E': // FirmwareRevision (Canon) / ColorSpace (Nikon)
|
774 |
switch( $brand ) {
|
775 |
case 'CANON':
|
776 |
$result = $data;
|
|
|
777 |
break;
|
778 |
case 'NIKON':
|
779 |
switch( $data ) {
|
781 |
case 2: $result = 'Adobe RGB'; break;
|
782 |
default: $result = $data;
|
783 |
}
|
|
|
784 |
break;
|
785 |
default:
|
786 |
$result = $data;
|
787 |
+
break;
|
788 |
}
|
789 |
break;
|
790 |
|
803 |
case 7: $result = __( 'Various', 'wp-photo-album-plus' ); break;
|
804 |
default: $result = $data;
|
805 |
}
|
|
|
806 |
break;
|
807 |
case 'NIKON':
|
808 |
switch( $data ) {
|
810 |
case 1: $result = __( 'On', 'wp-photo-album-plus' ); break;
|
811 |
default: $result = $data;
|
812 |
}
|
813 |
+
break;
|
814 |
default:
|
815 |
$result = $data;
|
816 |
+
break;
|
817 |
}
|
818 |
+
break;
|
819 |
|
820 |
case 'E#0023': // Categories
|
821 |
if ( $brand == 'CANON' ) {
|
837 |
}
|
838 |
}
|
839 |
}
|
840 |
+
break;
|
841 |
|
842 |
case 'E#0024': // FaceDetect1
|
843 |
case 'E#0025': // FaceDetect2
|
844 |
+
break;
|
845 |
|
846 |
case 'E#0026': // CanonAFInfo2
|
847 |
case 'E#003C': // CanonAFInfo3
|
881 |
$result = trim( $result, ', ' );
|
882 |
}
|
883 |
}
|
884 |
+
break;
|
885 |
|
886 |
case 'E#0027': // ContrastInfo
|
887 |
/*
|
892 |
*/
|
893 |
case 'E#0028': // ImageUniqueID
|
894 |
case 'E#002F': // FaceDetect3
|
895 |
+
break;
|
896 |
|
897 |
case 'E#0035': // TimeInfo
|
898 |
if ( $brand == 'CANON' && is_array( $data_arr ) && count( $data_arr ) == 4 ) {
|
942 |
elseif( $data_arr[3] == 60 ) $result .= 'On';
|
943 |
else $result .= '?';
|
944 |
}
|
945 |
+
break;
|
946 |
|
947 |
// case 'E#003C': // AFInfo3 // See E#0026
|
948 |
+
// break;
|
949 |
|
950 |
case 'E#0081': // RawDataOffset
|
951 |
case 'E#0083': // OriginalDecisionDataOffset
|
960 |
case 'E#0098': // CropInfo
|
961 |
case 'E#0099': // CustomFunctions2
|
962 |
$result = $data;
|
963 |
+
break;
|
964 |
|
965 |
case 'E#009A': // AspectInfo
|
966 |
$result = $data;
|
998 |
$result = trim( $result, ', ' );
|
999 |
}
|
1000 |
}
|
1001 |
+
break;
|
1002 |
|
1003 |
case 'E#00A0': // ProcessingInfo
|
1004 |
case 'E#00A1': // ToneCurveTable
|
1018 |
case 'E#00E0': // SensorInfo
|
1019 |
|
1020 |
$result = $data;
|
|
|
1021 |
break;
|
1022 |
|
1023 |
case 'E#00FE': // SubfileType (called NewSubfileType by the TIFF specification)
|
1037 |
case 0xffffffff: $result = __( 'invalid', 'wp-photo-album-plus' ); break;
|
1038 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1039 |
}
|
1040 |
+
break;
|
1041 |
|
1042 |
case 'E#00FF': // OldSubfileType (called SubfileType by the TIFF specification)
|
1043 |
|
1051 |
case 3: $result = __( 'Single page of multi-page image', 'wp-photo-album-plus' ); break;
|
1052 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1053 |
}
|
1054 |
+
break;
|
1055 |
|
1056 |
case 'E#0100': // Image width (pixels), Short or long, 1 item
|
1057 |
case 'E#0101': // Image length (pixels), Short or long, 1 item
|
1061 |
}
|
1062 |
|
1063 |
$result = $data . ' ' . __( 'px.', 'wp-photo-album-plus' );
|
1064 |
+
break;
|
1065 |
break;
|
1066 |
|
1067 |
case 'E#0106': // PhotometricInterpretation
|
1085 |
case 34892: $result = __( 'Linear Raw', 'wp-photo-album-plus' ); break;
|
1086 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1087 |
}
|
1088 |
+
break;
|
1089 |
|
1090 |
case 'E#0107': // Thresholding
|
1091 |
|
1097 |
case 3: $result = __( 'Randomized dither', 'wp-photo-album-plus' ); break;
|
1098 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1099 |
}
|
1100 |
+
break;
|
1101 |
|
1102 |
case 'E#010A': // FillOrder
|
1103 |
|
1108 |
case 2: $result = __( 'Reversed', 'wp-photo-album-plus' ); break;
|
1109 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1110 |
}
|
1111 |
+
break;
|
1112 |
|
1113 |
case 'E#0112': // Orientation
|
1114 |
|
1125 |
case 8: $result = __( 'Rotate 270 CW', 'wp-photo-album-plus' ); break;
|
1126 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1127 |
}
|
1128 |
+
break;
|
1129 |
|
1130 |
case 'E#011A': // XResolution
|
1131 |
case 'E#011B': // YResolution
|
1140 |
$y = $temp[1];
|
1141 |
|
1142 |
$result = ( $x / $y );
|
|
|
1143 |
break;
|
1144 |
|
1145 |
case 'E#011C': // PlanarConfiguration
|
1151 |
case 2: $result = __( 'Planar', 'wp-photo-album-plus' ); break;
|
1152 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1153 |
}
|
|
|
1154 |
break;
|
1155 |
|
1156 |
case 'E#0122': // GrayResponseUnit
|
1165 |
case 5: $result = '1e-06'; break;
|
1166 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1167 |
}
|
|
|
1168 |
break;
|
1169 |
|
1170 |
case 'E#0124': // T4Options
|
1175 |
if ( $data & 0x0004 ) $result .= __( 'Fill bits added', 'wp-photo-album-plus' );
|
1176 |
$result = trim( $result );
|
1177 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
|
|
1178 |
break;
|
1179 |
|
1180 |
case 'E#0125': // T6Options
|
1181 |
if ( $data & 0x0001 ) $result = __( 'Uncompressed', 'wp-photo-album-plus' );
|
1182 |
else $result = __( 'Undefined', 'wp-photo-album-plus' );
|
|
|
1183 |
break;
|
1184 |
|
1185 |
case 'E#0128': // Resolution unit
|
1191 |
case 3: $result = __( 'centimeters', 'wp-photo-album-plus' ); break;
|
1192 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1193 |
}
|
|
|
1194 |
break;
|
1195 |
|
1196 |
case 'E#013D': // Predictor
|
1202 |
case 2: $result = __( 'Horizontal differencing', 'wp-photo-album-plus' ); break;
|
1203 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1204 |
}
|
|
|
1205 |
break;
|
1206 |
|
1207 |
case 'E#0147': // CleanFaxData
|
1214 |
case 2: $result = __( 'Unclean', 'wp-photo-album-plus' ); break;
|
1215 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1216 |
}
|
|
|
1217 |
break;
|
1218 |
|
1219 |
case 'E#014C': // InkSet
|
1225 |
case 2: $result = __( 'Not CMYK', 'wp-photo-album-plus' ); break;
|
1226 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1227 |
}
|
|
|
1228 |
break;
|
1229 |
|
1230 |
case 'E#0152': // ExtraSamples
|
1237 |
case 2: $result = __( 'Unassociated Alpha', 'wp-photo-album-plus' ); break;
|
1238 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1239 |
}
|
|
|
1240 |
break;
|
1241 |
|
1242 |
case 'E#0153': // SampleFormat
|
1252 |
case 6: $result = __( 'Complex float', 'wp-photo-album-plus' ); break;
|
1253 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1254 |
}
|
|
|
1255 |
break;
|
1256 |
|
1257 |
case 'E#015A': // Indexed
|
1263 |
case 1: $result = __( 'Indexed', 'wp-photo-album-plus' ); break;
|
1264 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1265 |
}
|
|
|
1266 |
break;
|
1267 |
|
1268 |
case 'E#015F': // OPIProxy
|
1274 |
case 1: $result = __( 'Higher resolution image exists', 'wp-photo-album-plus' ); break;
|
1275 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1276 |
}
|
|
|
1277 |
break;
|
1278 |
|
1279 |
case 'E#0191': // ProfileType
|
1285 |
case 1: $result = __( 'Group 3 FAX', 'wp-photo-album-plus' ); break;
|
1286 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1287 |
}
|
|
|
1288 |
break;
|
1289 |
|
1290 |
case 'E#0192': // FaxProfile
|
1303 |
case 255: $result = __( 'Multi Profiles', 'wp-photo-album-plus' ); break;
|
1304 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
1305 |
}
|
|
|
1306 |
break;
|
1307 |
|
1308 |
case 'E#0193': // CodingMethods
|
1331 |
}
|
1332 |
$result = trim( $result, ', ' );
|
1333 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
|
|
1334 |
break;
|
1335 |
|
1336 |
case 'E#A210': // FocalPlaneResolutionUnit
|
1342 |
case 3: $result = __( 'centimeters', 'wp-photo-album-plus' ); break;
|
1343 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1344 |
}
|
|
|
1345 |
break;
|
1346 |
|
1347 |
case 'E#0212': // YCbCrSubSampling
|
1357 |
'4 2' = YCbCr4:1:0 (4 2)
|
1358 |
*/
|
1359 |
$result = $data;
|
|
|
1360 |
break;
|
1361 |
|
1362 |
case 'E#0213': // YCbCrPositioning
|
1373 |
default:
|
1374 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
1375 |
}
|
|
|
|
|
1376 |
break;
|
1377 |
|
1378 |
case 'E#4001': // ColorData
|
1381 |
case 'E#4005': // Flavor?
|
1382 |
|
1383 |
$result = $data;
|
|
|
1384 |
break;
|
1385 |
|
1386 |
case 'E#4008': // PictureStyleUserDef
|
1418 |
default:
|
1419 |
$result = $data;
|
1420 |
}
|
|
|
1421 |
break;
|
1422 |
|
1423 |
case 'E#4009': // PictureStylePC
|
1428 |
case 'E#4018': // LightingOpt
|
1429 |
case 'E#4019': // LensInfo
|
1430 |
$result = $data;
|
|
|
1431 |
break;
|
1432 |
|
1433 |
|
1445 |
case 8: $result = __( 'Monochrome', 'wp-photo-album-plus' ); break;
|
1446 |
default: $result = $data;
|
1447 |
}
|
|
|
1448 |
}
|
1449 |
else {
|
1450 |
$result = $data;
|
1451 |
}
|
1452 |
+
break;
|
1453 |
|
1454 |
case 'E#4021': // MultiExp
|
1455 |
case 'E#4024': // FilterInfo
|
1457 |
case 'E#4028': // AFConfig
|
1458 |
|
1459 |
$result = $data;
|
|
|
1460 |
break;
|
1461 |
|
1462 |
case 'E#7000': // SonyRawFileType
|
1470 |
case 3: $result = __( 'Sony Lossless Compressed RAW', 'wp-photo-album-plus' ); break;
|
1471 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1472 |
}
|
|
|
|
|
1473 |
break;
|
1474 |
|
1475 |
case 'E#829A': // Exposure time
|
1486 |
// 1 s.
|
1487 |
if ( $x / $y == 1 ) {
|
1488 |
$result = '1 s.';
|
|
|
1489 |
}
|
1490 |
|
1491 |
// Normal: 1/nn s.
|
1492 |
+
elseif ( $x == 1 ) {
|
1493 |
$result = $data . ' s.';
|
|
|
1494 |
}
|
1495 |
|
1496 |
// 'nn/1'
|
1497 |
+
elseif ( $y == 1 ) {
|
1498 |
$result = $x . ' s.';
|
|
|
1499 |
}
|
1500 |
|
1501 |
// Simplify nnn/mmm > 1
|
1502 |
+
elseif ( ( $x / $y ) > 1 ) {
|
1503 |
$result = sprintf( '%2.1f', $x / $y );
|
1504 |
if ( substr( $result, -2 ) == '.0' ) { // Remove trailing '.0'
|
1505 |
$result = substr( $result, 0, strlen( $result ) -2 ) . ' s.';
|
1533 |
}
|
1534 |
$result = substr( $z, 0, $i ) . ' s.';
|
1535 |
}
|
|
|
1536 |
break;
|
1537 |
|
1538 |
case 'E#829D': // F-Stop
|
1555 |
|
1556 |
// Valid meaningful data
|
1557 |
$result = 'f/' . ( round( 10 * $x / $y ) / 10 );
|
|
|
|
|
1558 |
break;
|
1559 |
|
1560 |
case 'E#84E3': // RasterPadding
|
1569 |
case 10: $result = __( 'Long Sector', 'wp-photo-album-plus' ); break;
|
1570 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1571 |
}
|
|
|
1572 |
break;
|
1573 |
|
1574 |
case 'E#84E7': // ImageColorIndicator
|
1580 |
case 1: $result = __( 'Specified Image Color', 'wp-photo-album-plus' ); break;
|
1581 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1582 |
}
|
|
|
1583 |
break;
|
1584 |
|
1585 |
case 'E#84E8': // BackgroundColorIndicator
|
1591 |
case 1: $result = __( 'Specified Background Color', 'wp-photo-album-plus' ); break;
|
1592 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1593 |
}
|
|
|
1594 |
break;
|
1595 |
|
1596 |
case 'E#84EE': // HCUsage
|
1603 |
case 2: $result = __( 'Trap', 'wp-photo-album-plus' ); break;
|
1604 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1605 |
}
|
|
|
1606 |
break;
|
1607 |
|
1608 |
case 'E#877F': // TIFF_FXExtensions
|
1617 |
if ( $data & 0x10 ) $data .= __( 'JBIG2 Profile M', 'wp-photo-album-plus' ) . ', ';
|
1618 |
$result = trim( $result, ', ' );
|
1619 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
|
|
1620 |
break;
|
1621 |
|
1622 |
case 'E#8780': // MultiProfiles
|
1637 |
if ( $data & 0x400 ) $data .= __( 'JBIG2 Profile M', 'wp-photo-album-plus' ) . ', ';
|
1638 |
$result = trim( $result, ', ' );
|
1639 |
if ( ! $result ) $result = __( 'Undefined', 'wp-photo-album-plus' );
|
|
|
1640 |
break;
|
1641 |
|
1642 |
case 'E#8822': // Exposure program
|
1656 |
case '9': $result = __('Bulb', 'wp-photo-album-plus' ); break;
|
1657 |
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
1658 |
}
|
|
|
1659 |
break;
|
1660 |
|
1661 |
case 'E#8830': // SensitivityType
|
1673 |
case '7': $result = __('Standard Output Sensitivity, Recommended Exposure Index and ISO Speed', 'wp-photo-album-plus' ); break;
|
1674 |
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
1675 |
}
|
|
|
1676 |
break;
|
1677 |
|
1678 |
case 'E#9101': // ComponentsConfiguration
|
1689 |
case '6': $result = 'B'; break;
|
1690 |
default: $result = '?';
|
1691 |
}
|
|
|
1692 |
break;
|
1693 |
|
1694 |
case 'E#9102': // CompressedBitsPerPixel
|
1702 |
else {
|
1703 |
$result = $data;
|
1704 |
}
|
|
|
1705 |
break;
|
1706 |
|
1707 |
case 'E#9201': // Shutter speed value
|
1714 |
$y = $temp[1];
|
1715 |
|
1716 |
$result = round( 10 * $x / $y ) / 10;
|
|
|
1717 |
break;
|
1718 |
|
1719 |
case 'E#9202': // Aperture value
|
1729 |
$y = $temp[1];
|
1730 |
|
1731 |
$result = round( 10 * $x / $y ) / 10;
|
|
|
|
|
1732 |
break;
|
1733 |
|
1734 |
case 'E#9204': // ExposureBiasValue
|
1743 |
$y = $t[1];
|
1744 |
|
1745 |
$result = sprintf( '%5.2f EV', $x/$y );
|
|
|
1746 |
break;
|
1747 |
|
1748 |
case 'E#9205': // Max aperture value
|
1758 |
$y = $temp[1];
|
1759 |
|
1760 |
$result = round( 10 * $x / $y ) / 10;
|
|
|
|
|
1761 |
break;
|
1762 |
|
1763 |
case 'E#9206': // Subject distance
|
1786 |
$result .= ' m.';
|
1787 |
}
|
1788 |
}
|
|
|
|
|
1789 |
break;
|
1790 |
|
|
|
|
|
1791 |
case 'E#9207': // Metering mode
|
1792 |
switch ( $data ) {
|
1793 |
case '1': $result = __('Average', 'wp-photo-album-plus' ); break;
|
1799 |
case '255': $result = __('Other', 'wp-photo-album-plus' ); break;
|
1800 |
default: $result = __('reserved', 'wp-photo-album-plus' );
|
1801 |
}
|
|
|
1802 |
break;
|
1803 |
|
1804 |
case 'E#9208': // LghtSource
|
1826 |
case '255': $result = __('other light source', 'wp-photo-album-plus' ); break;
|
1827 |
default: $result = __('reserved', 'wp-photo-album-plus' ); break;
|
1828 |
}
|
|
|
1829 |
break;
|
1830 |
|
1831 |
case 'E#9209': // Flash
|
1859 |
case '95': $result = __('Auto, Fired, Red-eye reduction, Return detected', 'wp-photo-album-plus' ); break;
|
1860 |
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
1861 |
}
|
|
|
|
|
1862 |
break;
|
1863 |
|
1864 |
case 'E#9210': // FocalPlaneResolutionUnit
|
1871 |
case 5: $result = 'μm'; break;
|
1872 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1873 |
}
|
|
|
|
|
1874 |
break;
|
1875 |
|
1876 |
case 'E#920A': // Focal length
|
1891 |
else {
|
1892 |
$result = round( $x / $y ) . ' mm.';
|
1893 |
}
|
|
|
1894 |
break;
|
1895 |
|
1896 |
case 'E#9212': // SecurityClassification
|
1903 |
case 'U': $result = __( 'Unclassified', 'wp-photo-album-plus' ); break;
|
1904 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1905 |
}
|
|
|
|
|
1906 |
break;
|
1907 |
|
1908 |
case 'E#9217': // SensingMethod
|
1920 |
case 8: $result = __( 'Color sequential linear', 'wp-photo-album-plus' ); break;
|
1921 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1922 |
}
|
|
|
|
|
1923 |
break;
|
1924 |
|
1925 |
case 'E#A001': // ColorSpace
|
1934 |
case 0xFFFF: $result = __( 'Uncalibrated', 'wp-photo-album-plus' ); break;
|
1935 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
1936 |
}
|
|
|
1937 |
break;
|
1938 |
|
1939 |
case 'E#A002': // PixelXDimension
|
1963 |
case 21: $result = 'Samsung NX 300mm F2.8 ED OIS'; break;
|
1964 |
default: $result = $data;
|
1965 |
}
|
|
|
|
|
1966 |
break;
|
1967 |
|
1968 |
default:
|
1971 |
}
|
1972 |
|
1973 |
$result = $data . ' px.';
|
|
|
1974 |
}
|
1975 |
break;
|
1976 |
|
1984 |
case 1: $result = 'Adobe RGB'; break;
|
1985 |
default: $result = $data;
|
1986 |
}
|
|
|
|
|
1987 |
break;
|
1988 |
|
1989 |
default:
|
1990 |
|
1991 |
$result = $data;
|
|
|
1992 |
}
|
1993 |
break;
|
1994 |
|
2002 |
case 1: $result = __( 'On', 'wp-photo-album-plus' ); break;
|
2003 |
default: $result = $data;
|
2004 |
}
|
|
|
|
|
2005 |
break;
|
2006 |
|
2007 |
default:
|
2008 |
|
2009 |
$result = $data;
|
|
|
2010 |
}
|
2011 |
break;
|
2012 |
|
2023 |
$y = $temp[1];
|
2024 |
|
2025 |
$result = round( $x / $y );
|
|
|
2026 |
break;
|
2027 |
|
2028 |
case 'E#A210': // FocalPlaneResolutionUnit
|
2035 |
case 5: $result = 'μm'; break;
|
2036 |
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
2037 |
}
|
|
|
|
|
2038 |
break;
|
2039 |
|
2040 |
case 'E#A217': // SensingMethod
|
2068 |
default:
|
2069 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2070 |
}
|
|
|
|
|
2071 |
break;
|
2072 |
|
2073 |
case 'E#A300': // FileSource
|
2079 |
case "\x03\x00\x00\x00": $result = __( 'Sigma Digital Camera', 'wp-photo-album-plus' ); break;
|
2080 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2081 |
}
|
|
|
2082 |
break;
|
2083 |
|
2084 |
case 'E#A401': // CustomRendered
|
2093 |
case 8: $result = __( 'Portrait', 'wp-photo-album-plus' ); break;
|
2094 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2095 |
}
|
|
|
2096 |
break;
|
2097 |
|
2098 |
case 'E#A402': // ExposureMode
|
2112 |
default:
|
2113 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2114 |
}
|
|
|
|
|
2115 |
break;
|
2116 |
|
2117 |
case 'E#A403': // WhiteBalance
|
2128 |
default:
|
2129 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2130 |
}
|
|
|
|
|
2131 |
break;
|
2132 |
|
2133 |
case 'E#A404': // DigitalZoomRatio
|
2147 |
}
|
2148 |
|
2149 |
$result = $data;
|
|
|
2150 |
break;
|
2151 |
|
2152 |
case 'E#A405': // FocalLengthIn35mmFilm
|
2156 |
}
|
2157 |
|
2158 |
$result = $data . ' mm.';
|
|
|
2159 |
break;
|
2160 |
|
2161 |
case 'E#A406': // SceneCaptureType
|
2177 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2178 |
break;
|
2179 |
}
|
|
|
|
|
2180 |
break;
|
2181 |
|
2182 |
case 'E#A407': // GainControl
|
2199 |
default:
|
2200 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2201 |
}
|
|
|
|
|
2202 |
break;
|
2203 |
|
2204 |
case 'E#A408': // Contrast
|
2220 |
default:
|
2221 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2222 |
}
|
|
|
|
|
2223 |
break;
|
2224 |
|
2225 |
case 'E#A409': // Saturation
|
2241 |
default:
|
2242 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2243 |
}
|
|
|
|
|
2244 |
break;
|
2245 |
|
2246 |
case 'E#A40A': // Sharpness
|
2262 |
default:
|
2263 |
$result = __( 'reserved', 'wp-photo-album-plus' );
|
2264 |
}
|
|
|
|
|
2265 |
break;
|
2266 |
|
2267 |
case 'E#A40C': // SubjectDistanceRange
|
2275 |
case 3: $result = __( 'Distant view', 'wp-photo-album-plus' ); break;
|
2276 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2277 |
}
|
|
|
2278 |
break;
|
2279 |
|
2280 |
case 'E#BC01': // PixelFormat
|
2339 |
case 0x3f: $result = __( '32-bit Gray Fixed Point', 'wp-photo-album-plus' ); break;
|
2340 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2341 |
}
|
|
|
2342 |
break;
|
2343 |
|
2344 |
case 'E#BC02': // Transformation
|
2356 |
case 7: $result = __( 'Rotate 270 CW', 'wp-photo-album-plus' ); break;
|
2357 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2358 |
}
|
2359 |
+
break;
|
2360 |
|
2361 |
case 'E#BC03': // Uncompressed
|
2362 |
|
2367 |
case 1: $result = __( 'Yes', 'wp-photo-album-plus' ); break;
|
2368 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2369 |
}
|
2370 |
+
break;
|
2371 |
|
2372 |
case 'E#BC04': // ImageType
|
2373 |
|
2379 |
case 3: $result = __( 'Preview', 'wp-photo-album-plus' ) . ' ' . __( 'Page', 'wp-photo-album-plus' ); break;
|
2380 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2381 |
}
|
2382 |
+
break;
|
2383 |
|
2384 |
/*
|
2385 |
0xbc80 ImageWidth
|
2404 |
case 3: $result = __( 'Highpass and LowPass Frequency Data Discarded', 'wp-photo-album-plus' ); break;
|
2405 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2406 |
}
|
2407 |
+
break;
|
2408 |
|
2409 |
case 'E#BCC5': // AlphaDataDiscard
|
2410 |
|
2417 |
case 3: $result = __( 'Highpass and LowPass Frequency Data Discarded', 'wp-photo-album-plus' ); break;
|
2418 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2419 |
}
|
2420 |
+
break;
|
2421 |
/*
|
2422 |
0xc427 OceScanjobDesc
|
2423 |
0xc428 OceApplicationSelector
|
2437 |
case 2: $result = __( 'Color', 'wp-photo-album-plus' ); break;
|
2438 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2439 |
}
|
2440 |
+
break;
|
2441 |
|
2442 |
/*
|
2443 |
0xc5e0 CR2CFAPattern
|
2470 |
case 9: $result = __( 'Even rows offset down by 1/2 row, even columns offset right by 1/2 column', 'wp-photo-album-plus' ); break;
|
2471 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2472 |
}
|
2473 |
+
break;
|
2474 |
|
2475 |
case 'E#C6FD': // ProfileEmbedPolicy
|
2476 |
|
2483 |
case 3: $result = __( 'No Restrictions', 'wp-photo-album-plus' ); break;
|
2484 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2485 |
}
|
2486 |
+
break;
|
2487 |
|
2488 |
case 'E#C71A': // PreviewColorSpace
|
2489 |
|
2497 |
case 4: $result = __( 'ProPhoto RGB', 'wp-photo-album-plus' ); break;
|
2498 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2499 |
}
|
2500 |
+
break;
|
2501 |
|
2502 |
case 'E#C7A3': // ProfileHueSatMapEncoding
|
2503 |
case 'E#C7A4': // ProfileLookTableEncoding
|
2509 |
case 1: $result = __( 'sRGB', 'wp-photo-album-plus' ); break;
|
2510 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2511 |
}
|
2512 |
+
break;
|
2513 |
|
2514 |
case 'E#C7A6': // DefaultBlackRender
|
2515 |
|
2520 |
case 1: $result = __( 'None', 'wp-photo-album-plus' ); break;
|
2521 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2522 |
}
|
2523 |
+
break;
|
2524 |
|
2525 |
|
2526 |
// FILE
|
2527 |
case 'F#0001': // FileName
|
2528 |
$result = $data;
|
2529 |
+
break;
|
2530 |
|
2531 |
case 'F#0002': // FileDateTime
|
2532 |
$result = wppa_local_date( '', $data );
|
2533 |
+
break;
|
2534 |
|
2535 |
case 'F#0003': // FileSize
|
2536 |
$result = $data . ' Bytes';
|
2537 |
+
break;
|
2538 |
|
2539 |
case 'F#0004': // FileType
|
2540 |
|
2546 |
case 3: $result = 'png'; break;
|
2547 |
default: $result = __( 'reserved', 'wp-photo-album-plus' );
|
2548 |
}
|
2549 |
+
break;
|
2550 |
|
2551 |
case 'F#0005': // MimeType
|
2552 |
case 'F#0006': // SectionsFound
|
2553 |
$result = $data;
|
2554 |
+
break;
|
2555 |
|
2556 |
// GPS
|
2557 |
case 'G#0000': // GPSVersionID int8u[4]
|
2558 |
$result = $data;
|
2559 |
+
break;
|
2560 |
|
2561 |
case 'G#0001': // GPSLatitudeRef string[2]
|
2562 |
switch( $data ) {
|
2564 |
case 'S': $result = __( 'South', 'wp-photo-album-plus' ); break;
|
2565 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2566 |
}
|
2567 |
+
break;
|
2568 |
|
2569 |
case 'G#0002': // GPSLatitude rational64u[3]
|
2570 |
for( $i = 0; $i < 3; $i++ ) {
|
2572 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2573 |
}
|
2574 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2575 |
+
break;
|
2576 |
|
2577 |
case 'G#0003': // GPSLongitudeRef string[2]
|
2578 |
switch( $data ) {
|
2580 |
case 'W': $result = __( 'West', 'wp-photo-album-plus' ); break;
|
2581 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2582 |
}
|
2583 |
+
break;
|
2584 |
|
2585 |
case 'G#0004': // GPSLongitude rational64u[3]
|
2586 |
for( $i = 0; $i < 3; $i++ ) {
|
2588 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2589 |
}
|
2590 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2591 |
+
break;
|
2592 |
|
2593 |
case 'G#0005': // GPSAltitudeRef int8u
|
2594 |
switch( $data ) {
|
2596 |
case 1: $result = __( 'Below Sea Level', 'wp-photo-album-plus' ); break;
|
2597 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2598 |
}
|
2599 |
+
break;
|
2600 |
|
2601 |
case 'G#0006': // GPSAltitude rational64u
|
2602 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2603 |
$result = wppa_simplify_rational( $data, true, 2 );
|
2604 |
+
break;
|
2605 |
|
2606 |
case 'G#0007': // GPSTimeStamp rational64u[3] UTC time of GPS fix.
|
2607 |
for( $i = 0; $i < 3; $i++ ) {
|
2609 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2610 |
}
|
2611 |
$result = $data_arr[0] . ':' . $data_arr[1] . ':' . $data_arr[2];
|
2612 |
+
break;
|
2613 |
|
2614 |
case 'G#0008': // GPSSatellites string
|
2615 |
$result = $data;
|
2616 |
+
break;
|
2617 |
|
2618 |
case 'G#0009': // GPSStatus string[2]
|
2619 |
switch( $data ) {
|
2621 |
case 'V': $result = __( 'Measurement Void', 'wp-photo-album-plus' ); break;
|
2622 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2623 |
}
|
2624 |
+
break;
|
2625 |
|
2626 |
case 'G#000A': // GPSMeasureMode string[2]
|
2627 |
switch( $data ) {
|
2629 |
case '3': $result = __( '3-Dimensional Measurement', 'wp-photo-album-plus' ); break;
|
2630 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2631 |
}
|
2632 |
+
break;
|
2633 |
|
2634 |
case 'G#000B': // GPSDOP rational64u
|
2635 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2636 |
$result = wppa_simplify_rational( $data, true );
|
2637 |
+
break;
|
2638 |
|
2639 |
case 'G#000C': // GPSSpeedRef string[2]
|
2640 |
switch( $data ) {
|
2643 |
case 'N': $result = __( 'knots', 'wp-photo-album-plus' ); break;
|
2644 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2645 |
}
|
2646 |
+
break;
|
2647 |
|
2648 |
case 'G#000D': // GPSSpeed rational64u
|
2649 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2650 |
$result = wppa_simplify_rational( $data, true );
|
2651 |
+
break;
|
2652 |
|
2653 |
case 'G#000E': // GPSTrackRef string[2]
|
2654 |
switch( $data ) {
|
2656 |
case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
|
2657 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2658 |
}
|
2659 |
+
break;
|
2660 |
|
2661 |
case 'G#000F': // GPSTrack rational64u
|
2662 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2663 |
$result = wppa_simplify_rational( $data, true );
|
2664 |
+
break;
|
2665 |
|
2666 |
case 'G#0010': // GPSImgDirectionRef string[2]
|
2667 |
switch( $data ) {
|
2669 |
case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
|
2670 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2671 |
}
|
2672 |
+
break;
|
2673 |
|
2674 |
case 'G#0011': // GPSImgDirection rational64u
|
2675 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2676 |
$result = wppa_simplify_rational( $data, true );
|
2677 |
+
break;
|
2678 |
|
2679 |
case 'G#0012': // GPSMapDatum string
|
2680 |
$result = $data;
|
2681 |
+
break;
|
2682 |
|
2683 |
case 'G#0013': // GPSDestLatitudeRef string[2]
|
2684 |
switch( $data ) {
|
2686 |
case 'S': $result = __( 'South', 'wp-photo-album-plus' ); break;
|
2687 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2688 |
}
|
2689 |
+
break;
|
2690 |
|
2691 |
case 'G#0014': // GPSDestLatitude rational64u[3]
|
2692 |
for( $i = 0; $i < 3; $i++ ) {
|
2694 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2695 |
}
|
2696 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2697 |
+
break;
|
2698 |
|
2699 |
case 'G#0015': // GPSDestLongitudeRef string[2]
|
2700 |
switch( $data ) {
|
2702 |
case 'W': $result = __( 'West', 'wp-photo-album-plus' ); break;
|
2703 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2704 |
}
|
2705 |
+
break;
|
2706 |
|
2707 |
case 'G#0016': // GPSDestLongitude rational64u[3]
|
2708 |
for( $i = 0; $i < 3; $i++ ) {
|
2710 |
$data_arr[$i] = wppa_simplify_rational( $data_arr[$i], true );
|
2711 |
}
|
2712 |
$result = $data_arr[0] . '°' . $data_arr[1] . "'" . $data_arr[2] . '"';
|
2713 |
+
break;
|
2714 |
|
2715 |
case 'G#0017': // GPSDestBearingRef string[2]
|
2716 |
switch( $data ) {
|
2718 |
case 'T': $result = __( 'True North', 'wp-photo-album-plus' ); break;
|
2719 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2720 |
}
|
2721 |
+
break;
|
2722 |
|
2723 |
case 'G#0018': // GPSDestBearing rational64u
|
2724 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2725 |
$result = wppa_simplify_rational( $data, true );
|
2726 |
+
break;
|
2727 |
|
2728 |
case 'G#0019': // GPSDestDistanceRef string[2]
|
2729 |
switch( $data ) {
|
2732 |
case 'N': $result = __( 'Nautical Miles', 'wp-photo-album-plus' ); break;
|
2733 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2734 |
}
|
2735 |
+
break;
|
2736 |
|
2737 |
case 'G#001A': // GPSDestDistance rational64u
|
2738 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2739 |
$result = wppa_simplify_rational( $data, true );
|
2740 |
+
break;
|
2741 |
|
2742 |
case 'G#001B': // GPSProcessingMethod undef
|
2743 |
case 'G#001C': // GPSAreaInformation undef
|
2744 |
case 'G#001D': // GPSDateStamp string[11]
|
2745 |
$result = $data;
|
2746 |
+
break;
|
2747 |
|
2748 |
case 'G#001E': // GPSDifferential int16u
|
2749 |
switch( $data ) {
|
2751 |
case 1: $result = __( 'Differential Corrected', 'wp-photo-album-plus' ); break;
|
2752 |
default: $result = __( 'Undefined', 'wp-photo-album-plus' );
|
2753 |
}
|
2754 |
+
break;
|
2755 |
|
2756 |
case 'G#001F': // GPSHPositioningError rational64u
|
2757 |
if ( ! wppa_is_valid_rational( $data ) ) return $wppa_exif_error_output;
|
2758 |
$result = wppa_simplify_rational( $data, true );
|
2759 |
+
break;
|
2760 |
|
2761 |
|
2762 |
// Unformatted
|
2763 |
default:
|
2764 |
+
$result = sanitize_text_field( $data );
|
2765 |
+
break;
|
2766 |
}
|
2767 |
}
|
2768 |
|
2771 |
$result = '';
|
2772 |
}
|
2773 |
|
2774 |
+
return esc_html( $result );
|
2775 |
}
|
2776 |
|
2777 |
function wppa_is_valid_rational( $data, $complain = true ) {
|
wppa-featen-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the featured photos
|
6 |
-
* Version 8.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -39,9 +39,9 @@ class FeaTenWidget extends WP_Widget {
|
|
39 |
|
40 |
// Cache?
|
41 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
42 |
-
|
43 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
44 |
-
|
45 |
wppa( 'in_widget', false );
|
46 |
return;
|
47 |
}
|
@@ -195,8 +195,8 @@ class FeaTenWidget extends WP_Widget {
|
|
195 |
}
|
196 |
$result .= $widget_content . $after_widget;
|
197 |
|
198 |
-
|
199 |
-
|
200 |
|
201 |
// Cache?
|
202 |
if ( $cache ) {
|
@@ -230,8 +230,7 @@ class FeaTenWidget extends WP_Widget {
|
|
230 |
$album = $instance['album'];
|
231 |
|
232 |
// Widget title
|
233 |
-
|
234 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
235 |
|
236 |
// Album selection
|
237 |
$body = wppa_album_select_a( array( 'selected' => $album,
|
@@ -240,23 +239,21 @@ class FeaTenWidget extends WP_Widget {
|
|
240 |
'path' => true,
|
241 |
'sort' => true,
|
242 |
) );
|
243 |
-
|
244 |
-
wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) );
|
245 |
|
246 |
// Loggedin only
|
247 |
-
|
248 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
249 |
|
250 |
// Cache
|
251 |
-
|
252 |
-
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
253 |
|
254 |
// Explanation
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
|
|
260 |
|
261 |
}
|
262 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the featured photos
|
6 |
+
* Version 8.1.10.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
39 |
|
40 |
// Cache?
|
41 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
42 |
+
wppa_echo( wppa_get_contents( $cachefile ) );
|
43 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
44 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
45 |
wppa( 'in_widget', false );
|
46 |
return;
|
47 |
}
|
195 |
}
|
196 |
$result .= $widget_content . $after_widget;
|
197 |
|
198 |
+
wppa_echo( $result );
|
199 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
200 |
|
201 |
// Cache?
|
202 |
if ( $cache ) {
|
230 |
$album = $instance['album'];
|
231 |
|
232 |
// Widget title
|
233 |
+
wppa_echo( wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) );
|
|
|
234 |
|
235 |
// Album selection
|
236 |
$body = wppa_album_select_a( array( 'selected' => $album,
|
239 |
'path' => true,
|
240 |
'sort' => true,
|
241 |
) );
|
242 |
+
wppa_echo( wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) ) );
|
|
|
243 |
|
244 |
// Loggedin only
|
245 |
+
wppa_echo( wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) );
|
|
|
246 |
|
247 |
// Cache
|
248 |
+
wppa_echo( wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) );
|
|
|
249 |
|
250 |
// Explanation
|
251 |
+
wppa_echo(
|
252 |
+
'<p>' .
|
253 |
+
__( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
|
254 |
+
' ' . __( 'Basic settings -> Widgets -> I -> Items 12 and 13', 'wp-photo-album-plus' ) .
|
255 |
+
'</p>'
|
256 |
+
);
|
257 |
|
258 |
}
|
259 |
|
wppa-gp-widget.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* A text widget that interpretes wppa shortcodes
|
6 |
*
|
7 |
-
* Version 8.
|
8 |
*/
|
9 |
|
10 |
class WppaGpWidget extends WP_Widget {
|
@@ -36,7 +36,7 @@ class WppaGpWidget extends WP_Widget {
|
|
36 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
37 |
echo wppa_get_contents( $cachefile );
|
38 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
39 |
-
|
40 |
wppa( 'in_widget', false );
|
41 |
return;
|
42 |
}
|
@@ -69,8 +69,8 @@ class WppaGpWidget extends WP_Widget {
|
|
69 |
}
|
70 |
$result .= $widget_content . $after_widget;
|
71 |
|
72 |
-
echo $result;
|
73 |
-
|
74 |
|
75 |
// Cache?
|
76 |
if ( $cache ) {
|
@@ -108,25 +108,22 @@ class WppaGpWidget extends WP_Widget {
|
|
108 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
109 |
|
110 |
// Widget title
|
111 |
-
|
112 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) )
|
113 |
|
114 |
// Text area
|
115 |
-
|
116 |
-
wppa_widget_textarea( $this, 'text', $instance['text'], __( 'Enter the content just like a normal text widget. This widget will interpret [wppa] shortcodes', 'wp-photo-album-plus' ) );
|
117 |
|
118 |
// Run wpautop?
|
119 |
-
|
120 |
-
wppa_widget_checkbox( $this, 'filter', $instance['filter'], __( 'Automatically add paragraphs', 'wp-photo-album-plus' ) );
|
121 |
|
122 |
// Logged in only?
|
123 |
-
|
124 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
125 |
|
126 |
// Cache
|
127 |
-
echo
|
128 |
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
129 |
|
|
|
130 |
}
|
131 |
|
132 |
// Set defaults
|
4 |
*
|
5 |
* A text widget that interpretes wppa shortcodes
|
6 |
*
|
7 |
+
* Version 8.1.10.001
|
8 |
*/
|
9 |
|
10 |
class WppaGpWidget extends WP_Widget {
|
36 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
37 |
echo wppa_get_contents( $cachefile );
|
38 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
39 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
40 |
wppa( 'in_widget', false );
|
41 |
return;
|
42 |
}
|
69 |
}
|
70 |
$result .= $widget_content . $after_widget;
|
71 |
|
72 |
+
echo( $result );
|
73 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
74 |
|
75 |
// Cache?
|
76 |
if ( $cache ) {
|
108 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
109 |
|
110 |
// Widget title
|
111 |
+
$result =
|
112 |
+
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) .
|
113 |
|
114 |
// Text area
|
115 |
+
wppa_widget_textarea( $this, 'text', $instance['text'], __( 'Enter the content just like a normal text widget. This widget will interpret [wppa] shortcodes', 'wp-photo-album-plus' ) ) .
|
|
|
116 |
|
117 |
// Run wpautop?
|
118 |
+
wppa_widget_checkbox( $this, 'filter', $instance['filter'], __( 'Automatically add paragraphs', 'wp-photo-album-plus' ) ) .
|
|
|
119 |
|
120 |
// Logged in only?
|
121 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) .
|
|
|
122 |
|
123 |
// Cache
|
|
|
124 |
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
125 |
|
126 |
+
wppa_echo( $result );
|
127 |
}
|
128 |
|
129 |
// Set defaults
|
wppa-help.php
CHANGED
@@ -3,32 +3,33 @@
|
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
* admin help page
|
6 |
-
* version 8.1.
|
7 |
*/
|
8 |
|
9 |
function _wppa_page_help() {
|
10 |
global $wppa_revno;
|
11 |
|
12 |
-
|
13 |
-
?>
|
14 |
<div class="wrap">
|
15 |
|
16 |
-
<h3
|
17 |
|
18 |
-
<h3
|
19 |
-
<p>
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
</p>
|
26 |
|
27 |
-
<h3
|
28 |
-
<p>
|
29 |
-
|
30 |
</p>
|
31 |
|
32 |
-
</div>
|
33 |
-
|
|
|
34 |
}
|
3 |
* Pachkage: wp-photo-album-plus
|
4 |
*
|
5 |
* admin help page
|
6 |
+
* version 8.1.10.001
|
7 |
*/
|
8 |
|
9 |
function _wppa_page_help() {
|
10 |
global $wppa_revno;
|
11 |
|
12 |
+
$result = '
|
|
|
13 |
<div class="wrap">
|
14 |
|
15 |
+
<h3>' . sprintf( __( 'You will find all information and examples on the new %s%s%s site', 'wp-photo-album-plus' ), '<a href="https://wppa.nl/" target="_blank" >', __( 'Docs & Demos', 'wp-photo-album-plus' ) , '</a>' ) . '</h3>
|
16 |
|
17 |
+
<h3>' . __( 'About and credits', 'wp-photo-album-plus' ) . '</h3>
|
18 |
+
<p>' .
|
19 |
+
__( 'WP Photo Album Plus is extended with many new features and is maintained by J.N. Breetvelt, a.k.a. OpaJaap', 'wp-photo-album-plus' ) . '<br>' .
|
20 |
+
__( 'Thanx to R.J. Kaplan for WP Photo Album 1.5.1.', 'wp-photo-album-plus' ) . '<br>' .
|
21 |
+
__( 'Thanx to E.S. Rosenberg for programming tips on security issues.', 'wp-photo-album-plus' ) . '<br>' .
|
22 |
+
__( 'Thanx to Pavel Šorejs for the Numbar code.', 'wp-photo-album-plus' ) . '<br>' .
|
23 |
+
__( 'Thanx to Alejandro Giraldez Sanches who inspired me to implement the display of spherical panoramic images', 'wp-photo-album-plus' ) . '<br>' .
|
24 |
+
__( 'Thanx to the users who reported bugs and asked for enhancements. Without them WPPA should not have been what it is now!', 'wp-photo-album-plus' ) . '<br>
|
25 |
</p>
|
26 |
|
27 |
+
<h3>' . __( 'Licence', 'wp-photo-album-plus' ) . '</h3>
|
28 |
+
<p>' .
|
29 |
+
__( 'WP Photo Album is released under the', 'wp-photo-album-plus' ) . ' <a href="http://www.gnu.org/licenses/gpl-2.0.html">GPLv2 or later</a> ' . __( 'licence.', 'wp-photo-album-plus' ) . '
|
30 |
</p>
|
31 |
|
32 |
+
</div>';
|
33 |
+
|
34 |
+
wppa_echo( $result );
|
35 |
}
|
wppa-init.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* This file loads required php files and contains all functions used in init actions.
|
6 |
*
|
7 |
-
* Version 8.1.
|
8 |
*/
|
9 |
|
10 |
/* LOAD SIDEBAR WIDGETS */
|
@@ -69,6 +69,9 @@ require_once 'wppa-boxes-html.php';
|
|
69 |
require_once 'wppa-slideshow.php';
|
70 |
require_once 'wppa-picture.php';
|
71 |
require_once 'wppa-input.php';
|
|
|
|
|
|
|
72 |
require_once 'wppa-cache.php';
|
73 |
|
74 |
/* Load cloudinary if configured and php version >= 5.3 */
|
@@ -77,7 +80,6 @@ if ( PHP_VERSION_ID >= 50300 ) require_once 'wppa-cloudinary.php';
|
|
77 |
/* DO THE ADMIN/NON ADMIN SPECIFIC STUFF */
|
78 |
if ( is_admin() ) {
|
79 |
require_once 'wppa-admin.php';
|
80 |
-
require_once 'wppa-setting-see-also.php';
|
81 |
}
|
82 |
require_once 'wppa-non-admin.php';
|
83 |
|
4 |
*
|
5 |
* This file loads required php files and contains all functions used in init actions.
|
6 |
*
|
7 |
+
* Version 8.1.10.001
|
8 |
*/
|
9 |
|
10 |
/* LOAD SIDEBAR WIDGETS */
|
69 |
require_once 'wppa-slideshow.php';
|
70 |
require_once 'wppa-picture.php';
|
71 |
require_once 'wppa-input.php';
|
72 |
+
|
73 |
+
// Here because it is required for block widgets
|
74 |
+
require_once 'wppa-setting-see-also.php';
|
75 |
require_once 'wppa-cache.php';
|
76 |
|
77 |
/* Load cloudinary if configured and php version >= 5.3 */
|
80 |
/* DO THE ADMIN/NON ADMIN SPECIFIC STUFF */
|
81 |
if ( is_admin() ) {
|
82 |
require_once 'wppa-admin.php';
|
|
|
83 |
}
|
84 |
require_once 'wppa-non-admin.php';
|
85 |
|
wppa-lasten-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the last uploaded photos
|
6 |
-
* Version 8.
|
7 |
*/
|
8 |
|
9 |
class LasTenWidget extends WP_Widget {
|
@@ -37,9 +37,9 @@ class LasTenWidget extends WP_Widget {
|
|
37 |
|
38 |
// Cache?
|
39 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
40 |
-
|
41 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
42 |
-
|
43 |
wppa( 'in_widget', false );
|
44 |
return;
|
45 |
}
|
@@ -206,8 +206,8 @@ class LasTenWidget extends WP_Widget {
|
|
206 |
}
|
207 |
$result .= $widget_content . $after_widget;
|
208 |
|
209 |
-
|
210 |
-
|
211 |
|
212 |
// Cache?
|
213 |
if ( $cache ) {
|
@@ -240,7 +240,7 @@ class LasTenWidget extends WP_Widget {
|
|
240 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
241 |
|
242 |
// Title
|
243 |
-
|
244 |
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
245 |
|
246 |
// Album
|
@@ -250,20 +250,18 @@ class LasTenWidget extends WP_Widget {
|
|
250 |
'addnumbers' => true,
|
251 |
'path' => true,
|
252 |
) );
|
253 |
-
|
254 |
-
wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) )
|
255 |
|
256 |
// Album enumeration
|
257 |
-
echo
|
258 |
wppa_widget_input( $this,
|
259 |
'albumenum',
|
260 |
$instance['albumenum'],
|
261 |
__( 'Albums', 'wp-photo-album-plus' ),
|
262 |
__( 'Select --- multiple see below --- in the Album selection box. Then enter album numbers seperated by commas', 'wp-photo-album-plus' )
|
263 |
-
)
|
264 |
|
265 |
// Include subalbums
|
266 |
-
echo
|
267 |
wppa_widget_checkbox( $this, 'includesubs', $instance['includesubs'], __( 'Include subalbums', 'wp-photo-album-plus' ) );
|
268 |
|
269 |
// Display type
|
@@ -273,27 +271,23 @@ class LasTenWidget extends WP_Widget {
|
|
273 |
$values = array( 'thumbs',
|
274 |
'names',
|
275 |
);
|
276 |
-
|
277 |
-
wppa_widget_selection( $this, 'display', $instance['display'], __( 'Display type', 'wp-photo-album-plus' ), $options, $values )
|
278 |
|
279 |
// Time since
|
280 |
-
|
281 |
-
wppa_widget_checkbox( $this, 'timesince', $instance['timesince'], __( 'Show time since', 'wp-photo-album-plus' ) );
|
282 |
|
283 |
// Loggedin only
|
284 |
-
|
285 |
-
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
286 |
|
287 |
// Cache
|
288 |
-
|
289 |
-
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) );
|
290 |
|
291 |
-
echo
|
292 |
'<p>' .
|
293 |
__( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
|
294 |
' ' . __( 'Basic settings -> Widgets -> I -> Items 8 and 9', 'wp-photo-album-plus' ) .
|
295 |
'</p>';
|
296 |
-
|
297 |
}
|
298 |
|
299 |
// Set defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the last uploaded photos
|
6 |
+
* Version 8.1.10.001
|
7 |
*/
|
8 |
|
9 |
class LasTenWidget extends WP_Widget {
|
37 |
|
38 |
// Cache?
|
39 |
if ( $cache && wppa_is_file( $cachefile ) ) {
|
40 |
+
wppa_echo( wppa_get_contents( $cachefile ) );
|
41 |
update_option( 'wppa_cache_hits', get_option( 'wppa_cache_hits', 0 ) +1 );
|
42 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title, true ) );
|
43 |
wppa( 'in_widget', false );
|
44 |
return;
|
45 |
}
|
206 |
}
|
207 |
$result .= $widget_content . $after_widget;
|
208 |
|
209 |
+
wppa_echo( $result );
|
210 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
211 |
|
212 |
// Cache?
|
213 |
if ( $cache ) {
|
240 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
241 |
|
242 |
// Title
|
243 |
+
$result =
|
244 |
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
245 |
|
246 |
// Album
|
250 |
'addnumbers' => true,
|
251 |
'path' => true,
|
252 |
) );
|
253 |
+
$result .=
|
254 |
+
wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) ) .
|
255 |
|
256 |
// Album enumeration
|
|
|
257 |
wppa_widget_input( $this,
|
258 |
'albumenum',
|
259 |
$instance['albumenum'],
|
260 |
__( 'Albums', 'wp-photo-album-plus' ),
|
261 |
__( 'Select --- multiple see below --- in the Album selection box. Then enter album numbers seperated by commas', 'wp-photo-album-plus' )
|
262 |
+
) .
|
263 |
|
264 |
// Include subalbums
|
|
|
265 |
wppa_widget_checkbox( $this, 'includesubs', $instance['includesubs'], __( 'Include subalbums', 'wp-photo-album-plus' ) );
|
266 |
|
267 |
// Display type
|
271 |
$values = array( 'thumbs',
|
272 |
'names',
|
273 |
);
|
274 |
+
$result .=
|
275 |
+
wppa_widget_selection( $this, 'display', $instance['display'], __( 'Display type', 'wp-photo-album-plus' ), $options, $values ) .
|
276 |
|
277 |
// Time since
|
278 |
+
wppa_widget_checkbox( $this, 'timesince', $instance['timesince'], __( 'Show time since', 'wp-photo-album-plus' ) ) .
|
|
|
279 |
|
280 |
// Loggedin only
|
281 |
+
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) ) .
|
|
|
282 |
|
283 |
// Cache
|
284 |
+
wppa_widget_checkbox( $this, 'cache', $instance['cache'], __( 'Cache this widget', 'wp-photo-album-plus' ) ) .
|
|
|
285 |
|
|
|
286 |
'<p>' .
|
287 |
__( 'You can set the sizes in this widget in the <b>Photo Albums -> Settings</b> admin page.', 'wp-photo-album-plus' ) .
|
288 |
' ' . __( 'Basic settings -> Widgets -> I -> Items 8 and 9', 'wp-photo-album-plus' ) .
|
289 |
'</p>';
|
290 |
+
wppa_echo( $result );
|
291 |
}
|
292 |
|
293 |
// Set defaults
|
wppa-notify-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* notify events to users
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
class wppaNotifyWidget extends WP_Widget {
|
@@ -253,8 +253,8 @@ class wppaNotifyWidget extends WP_Widget {
|
|
253 |
}
|
254 |
$result .= $widget_content . $after_widget;
|
255 |
|
256 |
-
|
257 |
-
|
258 |
|
259 |
wppa( 'in_widget', false );
|
260 |
}
|
@@ -280,8 +280,7 @@ class wppaNotifyWidget extends WP_Widget {
|
|
280 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
281 |
|
282 |
// Title
|
283 |
-
|
284 |
-
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
285 |
}
|
286 |
|
287 |
// Set defaults
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* notify events to users
|
6 |
+
* Version 8.1.10.001
|
7 |
*/
|
8 |
|
9 |
class wppaNotifyWidget extends WP_Widget {
|
253 |
}
|
254 |
$result .= $widget_content . $after_widget;
|
255 |
|
256 |
+
wppa_echo( $result );
|
257 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
258 |
|
259 |
wppa( 'in_widget', false );
|
260 |
}
|
280 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
281 |
|
282 |
// Title
|
283 |
+
wppa_echo( wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) ) );
|
|
|
284 |
}
|
285 |
|
286 |
// Set defaults
|
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.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -20,9 +20,9 @@ function _wppa_edit_photo() {
|
|
20 |
$photo = wppa_get( 'photo', '0', 'int' );
|
21 |
$thumb = wppa_cache_thumb( $photo );
|
22 |
if ( $thumb['owner'] == wppa_get_user() ) {
|
23 |
-
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>'
|
24 |
wppa_album_photos( '', $photo );
|
25 |
-
wppa_echo( '</div>'
|
26 |
}
|
27 |
else {
|
28 |
wp_die( 'You do not have the rights to do this' );
|
@@ -31,9 +31,9 @@ function _wppa_edit_photo() {
|
|
31 |
|
32 |
// Edit all photos owned by current user
|
33 |
else {
|
34 |
-
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Edit photos', 'wp-photo-album-plus' ) . '</h2>'
|
35 |
wppa_album_photos( '', '', wppa_get_user() );
|
36 |
-
wppa_echo( '</div>'
|
37 |
}
|
38 |
}
|
39 |
|
@@ -45,19 +45,19 @@ function _wppa_moderate_photos() {
|
|
45 |
$just_edit = wppa_get( 'just-edit' );
|
46 |
|
47 |
if ( $photo && $just_edit && wppa_user_is( 'administrator' ) ) {
|
48 |
-
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>' . wppa_get( 'just-edit' )
|
49 |
wppa_album_photos( '', $photo, '', false );
|
50 |
-
wppa_echo( '</div>'
|
51 |
}
|
52 |
else {
|
53 |
-
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Moderate photos' , 'wp-photo-album-plus' ) . '</h2>'
|
54 |
if ( wppa_switch( 'moderate_bulk' ) ) {
|
55 |
wppa_album_photos_bulk( 'moderate' );
|
56 |
}
|
57 |
else {
|
58 |
wppa_album_photos( '', $photo, '', true );
|
59 |
}
|
60 |
-
wppa_echo( '</div>'
|
61 |
}
|
62 |
}
|
63 |
|
@@ -198,17 +198,17 @@ global $wpdb;
|
|
198 |
|
199 |
// Single photo moderate requested
|
200 |
if ( $photo ) {
|
201 |
-
wppa_echo( '<p>' . esc_html__( 'This photo is no longer awaiting moderation.' , 'wp-photo-album-plus' ) . '</p>'
|
202 |
}
|
203 |
|
204 |
// Multiple photos to moderate requested
|
205 |
else {
|
206 |
-
wppa_echo( '<p>' . esc_html__( 'There are no photos awaiting moderation at this time.', 'wp-photo-album-plus' ) . '</p>'
|
207 |
}
|
208 |
|
209 |
// If i am admin, i can edit all photos here, sorted by timestamp desc
|
210 |
if ( wppa_user_is( 'administrator' ) ) {
|
211 |
-
wppa_echo( '<h3>' . esc_html__( 'Manage all photos by timestamp', 'wp-photo-album-plus' ) . '</h3>'
|
212 |
|
213 |
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
214 |
ORDER BY timestamp DESC
|
@@ -249,7 +249,7 @@ global $wpdb;
|
|
249 |
<span style="color:red">' .
|
250 |
sprintf( esc_html__( 'Photo %s has been removed.', 'wp-photo-album-plus' ), $photo ) . '
|
251 |
</span>
|
252 |
-
</div>'
|
253 |
}
|
254 |
|
255 |
// A collection of photos requested
|
@@ -257,12 +257,12 @@ global $wpdb;
|
|
257 |
|
258 |
// Search
|
259 |
if ( wppa_get( 'searchstring' ) ) {
|
260 |
-
wppa_echo( '<h3>' . esc_html__( 'No photos matching your search criteria.', 'wp-photo-album-plus' ) . '</h3>'
|
261 |
}
|
262 |
|
263 |
// Album
|
264 |
else {
|
265 |
-
wppa_echo( '<h3>' . esc_html__( 'No photos yet in this album.', 'wp-photo-album-plus' ) . '</h3>'
|
266 |
}
|
267 |
}
|
268 |
|
@@ -494,7 +494,7 @@ function wppaToggleExif( id, count ) {
|
|
494 |
wppa_admin_page_links( $page, $pagesize, $count, $link );
|
495 |
|
496 |
// Horizon
|
497 |
-
wppa_echo( '<div id="wppa-horizon"><hr
|
498 |
|
499 |
wppa_add_inline_script( 'wppa-admin', 'wppaDragHorizon(document.getElementById("wppa-horizon"))' );
|
500 |
|
@@ -565,16 +565,18 @@ function wppaToggleExif( id, count ) {
|
|
565 |
'cenlft' => __( 'center - left' , 'wp-photo-album-plus' ), 'cencen' => __( 'center - center' , 'wp-photo-album-plus' ), 'cenrht' => __( 'center - right' , 'wp-photo-album-plus' ),
|
566 |
'botlft' => __( 'bottom - left' , 'wp-photo-album-plus' ), 'botcen' => __( 'bottom - center' , 'wp-photo-album-plus' ), 'botrht' => __( 'bottom - right' , 'wp-photo-album-plus' ), );
|
567 |
|
|
|
|
|
568 |
// Album for moderate
|
569 |
if ( $modalbum != $album && $album && ! wppa_get( 'just-edit' ) && wppa_get( 'edit-id' ) != 'trash' ) {
|
570 |
wppa_echo( '<h3>' . sprintf( __( 'Edit/Moderate photos from album %s by %s', 'wp-photo-album-plus' ),
|
571 |
'<i>' . sanitize_text_field( wppa_get_album_name( $album ) ) . '</i>',
|
572 |
-
'<i>' . sanitize_user( wppa_get_album_item( $album, 'owner' ) ) . '</i>' ) . '</h3>'
|
573 |
$modalbum = $album;
|
574 |
}
|
575 |
|
576 |
// Anchor for scroll to
|
577 |
-
wppa_echo( '<a id="photo_' . $id . '"></a>'
|
578 |
|
579 |
// The photo data
|
580 |
wppa_echo( '
|
@@ -670,6 +672,10 @@ function wppaToggleExif( id, count ) {
|
|
670 |
wppa_echo( '
|
671 |
</td>' );
|
672 |
|
|
|
|
|
|
|
|
|
673 |
// --- More or less static data ---
|
674 |
wppa_echo( '
|
675 |
<td>' .
|
@@ -678,14 +684,14 @@ function wppaToggleExif( id, count ) {
|
|
678 |
'ID = ' . strval( intval( $id ) ) . '. ' .
|
679 |
|
680 |
// Crypt
|
681 |
-
__( 'Crypt:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $crypt ) . '. ' .
|
682 |
|
683 |
// Filename
|
684 |
-
__( 'Filename:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $filename ) . '. ' .
|
685 |
|
686 |
// Upload
|
687 |
__( 'Upload:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( wppa_local_date( '', $timestamp ) ) . ' ' .
|
688 |
-
__( 'local time', 'wp-photo-album-plus' ) . '. ' );
|
689 |
|
690 |
// Owner
|
691 |
if ( $owner_editable ) {
|
@@ -695,10 +701,10 @@ function wppaToggleExif( id, count ) {
|
|
695 |
type="text"
|
696 |
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
|
697 |
value="' . esc_attr( $owner ) . '"
|
698 |
-
/>
|
699 |
}
|
700 |
else {
|
701 |
-
wppa_echo( __( 'By:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $owner ) . '.
|
702 |
}
|
703 |
|
704 |
// Album
|
@@ -707,14 +713,14 @@ function wppaToggleExif( id, count ) {
|
|
707 |
$album = - ( $album + '9' );
|
708 |
$deleted = true;
|
709 |
}
|
710 |
-
wppa_echo( sprintf( __( 'Album: %d (%s).', 'wp-photo-album-plus' ), strval( intval( $album ) ), htmlspecialchars( wppa_get_album_name( $album ) ) ) .
|
711 |
|
712 |
// Modified
|
713 |
if ( $deleted ) {
|
714 |
wppa_echo( '
|
715 |
<span style="color:red">' .
|
716 |
__( 'Trashed', 'wp-photo-album-plus' ) . '
|
717 |
-
</span>'
|
718 |
}
|
719 |
else {
|
720 |
if ( $modified > $timestamp ) {
|
@@ -723,16 +729,16 @@ function wppaToggleExif( id, count ) {
|
|
723 |
<span id="modified-' . $id . '">' .
|
724 |
wppa_local_date( '', $modified ) . '
|
725 |
</span>' .
|
726 |
-
__( 'local time', 'wp-photo-album-plus' )
|
727 |
}
|
728 |
else {
|
729 |
-
wppa_echo( __( 'Not modified', 'wp-photo-album-plus' )
|
730 |
}
|
731 |
}
|
732 |
-
wppa_echo( '.
|
733 |
|
734 |
// Exif
|
735 |
-
wppa_echo( __( 'EXIF Date:', 'wp-photo-album-plus' )
|
736 |
if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
|
737 |
wppa_echo( '
|
738 |
<input
|
@@ -743,18 +749,18 @@ function wppaToggleExif( id, count ) {
|
|
743 |
/>' );
|
744 |
}
|
745 |
else {
|
746 |
-
wppa_echo( esc_html( $exifdtm ) . '.'
|
747 |
}
|
748 |
-
wppa_echo(
|
749 |
|
750 |
// Location
|
751 |
if ( $photo['location'] || wppa_switch( 'geo_edit' ) ) {
|
752 |
wppa_echo(
|
753 |
-
__( 'Location:' , 'wp-photo-album-plus' ) . ' '
|
754 |
$loc = $location ? $location : '///';
|
755 |
$geo = explode( '/', $loc );
|
756 |
|
757 |
-
wppa_echo( esc_html( $geo['0'].' '.$geo['1'].'. ' )
|
758 |
|
759 |
if ( wppa_switch( 'geo_edit' ) ) {
|
760 |
wppa_echo(
|
@@ -772,12 +778,12 @@ function wppaToggleExif( id, count ) {
|
|
772 |
id="lon-' . $id . '"
|
773 |
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value)"
|
774 |
value="' . esc_attr( $geo['3'] ) . '"
|
775 |
-
/>' );
|
776 |
}
|
777 |
}
|
778 |
|
779 |
// Changeable p_order
|
780 |
-
wppa_echo( __( 'Photo sort order #:', 'wp-photo-album-plus' )
|
781 |
if ( $sortby_orderno && ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) ) {
|
782 |
wppa_echo( '
|
783 |
<input
|
@@ -786,10 +792,10 @@ function wppaToggleExif( id, count ) {
|
|
786 |
value="' . esc_attr( $p_order ) . '"
|
787 |
style="width:30px"
|
788 |
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
|
789 |
-
/>
|
790 |
}
|
791 |
else {
|
792 |
-
wppa_echo( ' ' . $p_order . '.
|
793 |
}
|
794 |
|
795 |
// Rating
|
@@ -797,7 +803,7 @@ function wppaToggleExif( id, count ) {
|
|
797 |
if ( $entries ) {
|
798 |
|
799 |
if ( wppa_opt( 'rating_display_type' ) == 'likes' ) {
|
800 |
-
wppa_echo( __( 'Likes:', 'wp-photo-album-plus' ) . ' ' . strval( intval( $entries ) ) . '.
|
801 |
}
|
802 |
else {
|
803 |
wppa_echo(
|
@@ -807,25 +813,25 @@ function wppaToggleExif( id, count ) {
|
|
807 |
__( 'Mean value:', 'wp-photo-album-plus' ) .
|
808 |
' ' .
|
809 |
wppa_get_rating_by_id( $id, 'nolabel' ) .
|
810 |
-
'.
|
811 |
}
|
812 |
}
|
813 |
else {
|
814 |
-
wppa_echo( __( 'No ratings for this photo.', 'wp-photo-album-plus' ) .
|
815 |
}
|
816 |
$dislikes = wppa_dislike_get( $id );
|
817 |
if ( $dislikes ) {
|
818 |
wppa_echo(
|
819 |
'<span style="color:red">' .
|
820 |
sprintf( _n( 'Disliked by %d visitor', 'Disliked by %d visitors', $dislikes, 'wp-photo-album-plus' ), $dislikes ) . '. ' .
|
821 |
-
'</span>'
|
822 |
}
|
823 |
$pending = wppa_pendrat_get( $id );
|
824 |
if ( $pending ) {
|
825 |
wppa_echo(
|
826 |
'<span style="color:orange">' .
|
827 |
sprintf( __( '%d pending votes.', 'wp-photo-album-plus' ), $pending ) . ' ' .
|
828 |
-
'</span>'
|
829 |
}
|
830 |
|
831 |
// Views
|
@@ -833,7 +839,7 @@ function wppaToggleExif( id, count ) {
|
|
833 |
wppa_echo(
|
834 |
__( 'Views' , 'wp-photo-album-plus' ) . ': ' .
|
835 |
htmlspecialchars( $views ) .
|
836 |
-
'.
|
837 |
}
|
838 |
|
839 |
// Clicks
|
@@ -841,7 +847,7 @@ function wppaToggleExif( id, count ) {
|
|
841 |
wppa_echo(
|
842 |
__( 'Clicks', 'wp-photo-album-plus' ) . ': ' .
|
843 |
htmlspecialchars( $clicks ) .
|
844 |
-
'.
|
845 |
}
|
846 |
|
847 |
// Downloads
|
@@ -849,12 +855,12 @@ function wppaToggleExif( id, count ) {
|
|
849 |
wppa_echo(
|
850 |
__( 'Downloads', 'wp-photo-album-plus' ) . ': ' .
|
851 |
htmlspecialchars( $dlcount ) .
|
852 |
-
'.
|
853 |
// }
|
854 |
|
855 |
// Status
|
856 |
wppa_echo( '<br>' .
|
857 |
-
__( 'Status:' , 'wp-photo-album-plus' ) . ' '
|
858 |
if ( ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) ) {
|
859 |
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
860 |
$dis = ' disabled';
|
@@ -901,7 +907,7 @@ function wppaToggleExif( id, count ) {
|
|
901 |
' type="hidden"' .
|
902 |
' id="status-' . $id . '"' .
|
903 |
' value="' . esc_attr( $status ) . '"' .
|
904 |
-
' />'
|
905 |
if ( $status == 'pending' ) _e( 'Pending', 'wp-photo-album-plus' );
|
906 |
elseif ( $status == 'publish' ) _e( 'Publish', 'wp-photo-album-plus' );
|
907 |
elseif ( $status == 'featured' ) _e( 'Featured', 'wp-photo-album-plus' );
|
@@ -916,7 +922,7 @@ function wppaToggleExif( id, count ) {
|
|
916 |
__( 'Note: Featured photos should have a descriptive name; a name a search engine will look for!', 'wp-photo-album-plus' ) .
|
917 |
'</span>' );
|
918 |
}
|
919 |
-
wppa_echo(
|
920 |
|
921 |
// Schedule for delete
|
922 |
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
@@ -933,8 +939,7 @@ function wppaToggleExif( id, count ) {
|
|
933 |
' onchange="wppaTryScheduledel( ' . $id . ' )"' .
|
934 |
' />' .
|
935 |
' ' .
|
936 |
-
wppa_get_date_time_select_html( 'delphoto', $id, $may_change ) .
|
937 |
-
' ' );
|
938 |
}
|
939 |
|
940 |
// Update status field
|
@@ -946,24 +951,24 @@ function wppaToggleExif( id, count ) {
|
|
946 |
' >' .
|
947 |
( $is_video ? sprintf( __( 'Video %s is not modified yet', 'wp-photo-album-plus' ), $id ) :
|
948 |
sprintf( __( 'Photo %s is not modified yet', 'wp-photo-album-plus' ), $id ) ) .
|
949 |
-
'</span>'
|
950 |
|
951 |
// New Line
|
952 |
-
wppa_echo( '<br>'
|
953 |
|
954 |
// --- Available files ---
|
955 |
wppa_echo(
|
956 |
-
__( 'Available files:', 'wp-photo-album-plus' ) .
|
957 |
|
958 |
// Pdf
|
959 |
if ( wppa_is_pdf( $id ) ) {
|
960 |
$sp = wppa_get_source_path( $id );
|
961 |
$fs = wppa_get_filesize( $sp );
|
962 |
-
wppa_echo( __( 'Document file:', 'wp-photo-album-plus' ) . ' ' . $fs . ' '
|
963 |
}
|
964 |
|
965 |
// Source
|
966 |
-
wppa_echo( __( 'Source file:', 'wp-photo-album-plus' ) . ' '
|
967 |
$sp = wppa_get_o1_source_path( $id );
|
968 |
if ( ! wppa_is_file( $sp ) ) {
|
969 |
$sp = wppa_get_source_path( $id );
|
@@ -978,33 +983,33 @@ function wppaToggleExif( id, count ) {
|
|
978 |
$ima = getimagesize( $sp );
|
979 |
wppa_echo(
|
980 |
$ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' .
|
981 |
-
wppa_get_filesize( $sp ) . '.
|
982 |
}
|
983 |
else {
|
984 |
-
wppa_echo( __( 'Unavailable', 'wp-photo-album-plus' ) . '.
|
985 |
}
|
986 |
|
987 |
// Display
|
988 |
wppa_echo(
|
989 |
-
( $is_video || $has_audio ? __( 'Poster file:', 'wp-photo-album-plus' ) : __( 'Display file:', 'wp-photo-album-plus' ) ) . ' '
|
990 |
$dp = wppa_get_photo_path( $id );
|
991 |
if ( is_file( $dp ) ) {
|
992 |
wppa_echo(
|
993 |
'<span id="photox-'.$id.'">'.wppa_get_photox( $id ).'</span>' .
|
994 |
' x ' .
|
995 |
'<span id="photoy-'.$id.'">'.wppa_get_photoy( $id ).'</span>' .
|
996 |
-
'
|
997 |
}
|
998 |
else {
|
999 |
wppa_echo(
|
1000 |
'<span style="color:red">' .
|
1001 |
__( 'Unavailable', 'wp-photo-album-plus' ) . '. ' .
|
1002 |
-
'</span>.
|
1003 |
}
|
1004 |
|
1005 |
// Thumbnail
|
1006 |
if ( ! $is_video ) {
|
1007 |
-
wppa_echo( __( 'Thumbnail file:', 'wp-photo-album-plus' ) . ' '
|
1008 |
$tp = wppa_get_thumb_path( $id );
|
1009 |
if ( is_file( $tp ) ) {
|
1010 |
|
@@ -1019,20 +1024,22 @@ function wppaToggleExif( id, count ) {
|
|
1019 |
( $thumblock ? ' checked="checked"' : '' ) .
|
1020 |
' onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )"' .
|
1021 |
' /> ' .
|
1022 |
-
__( 'Locked', 'wp-photo-album-plus' ) . '.
|
1023 |
|
1024 |
}
|
1025 |
else {
|
1026 |
wppa_echo(
|
1027 |
'<span style="color:red">' .
|
1028 |
__( 'Unavailable', 'wp-photo-album-plus' ) . '. ' .
|
1029 |
-
'</span>.
|
1030 |
}
|
1031 |
}
|
1032 |
|
|
|
|
|
1033 |
// Local CDN
|
1034 |
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
1035 |
-
wppa_echo( __( 'Local CDN files', 'wp-photo-album-plus' ) . ':<span id="cdnfiles-' . $id . '">'
|
1036 |
$files = wppa_cdn_files( $id );
|
1037 |
if ( is_array( $files ) ) {
|
1038 |
foreach( $files as $file ) {
|
@@ -1049,15 +1056,15 @@ function wppaToggleExif( id, count ) {
|
|
1049 |
>' .
|
1050 |
basename( $file ) .
|
1051 |
' </a>' .
|
1052 |
-
sprintf( '%4.2fkB', $size / 1024 ) .
|
1053 |
}
|
1054 |
}
|
1055 |
}
|
1056 |
-
wppa_echo( '</span>'
|
1057 |
}
|
1058 |
|
1059 |
// New line
|
1060 |
-
wppa_echo( '<br>'
|
1061 |
|
1062 |
// Video
|
1063 |
if ( $b_is_video ) {
|
@@ -1081,48 +1088,49 @@ function wppaToggleExif( id, count ) {
|
|
1081 |
if ( $duration ) {
|
1082 |
$duration = intval( $duration * 100 ) / 100;
|
1083 |
if ( $duration < 120.0 ) {
|
1084 |
-
wppa_echo( sprintf( __( 'Duration: %s seconds', 'wp-photo-album-plus' ) ,$duration ) . '. '
|
1085 |
}
|
1086 |
else {
|
1087 |
wppa_echo( sprintf( __( 'Duration: %s minutes and %s seconds', 'wp-photo-album-plus' ),
|
1088 |
sprintf( '%d', floor( $duration / 60 ) ),
|
1089 |
sprintf( '%4.2f', $duration % 60 ) ) .
|
1090 |
-
'. '
|
1091 |
}
|
1092 |
}
|
1093 |
|
1094 |
-
wppa_echo( __( 'Formats:', 'wp-photo-album-plus' ) . ' '
|
1095 |
$c = 0;
|
1096 |
foreach ( $is_video as $fmt ) {
|
1097 |
wppa_echo(
|
1098 |
$fmt . ' ' .
|
1099 |
__( 'Filesize:', 'wp-photo-album-plus' ) . ' ' .
|
1100 |
-
wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) )
|
1101 |
$c++;
|
1102 |
if ( is_array( $is_video ) && $c == count( $is_video ) ) {
|
1103 |
-
wppa_echo( '. '
|
1104 |
}
|
1105 |
else {
|
1106 |
-
wppa_echo( ', '
|
1107 |
}
|
1108 |
}
|
1109 |
}
|
|
|
1110 |
|
1111 |
// Audio
|
1112 |
if ( $b_has_audio ) {
|
1113 |
-
wppa_echo( __( 'Formats:', 'wp-photo-album-plus' ) . ' '
|
1114 |
$c = 0;
|
1115 |
foreach ( $has_audio as $fmt ) {
|
1116 |
wppa_echo(
|
1117 |
$fmt . ' ' .
|
1118 |
__( 'Filesize:', 'wp-photo-album-plus' ) . ' ' .
|
1119 |
-
wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) )
|
1120 |
$c++;
|
1121 |
if ( is_array( $is_video ) && $c == count( $is_video ) ) {
|
1122 |
-
wppa_echo( '. '
|
1123 |
}
|
1124 |
else {
|
1125 |
-
wppa_echo( ', '
|
1126 |
}
|
1127 |
}
|
1128 |
}
|
@@ -1133,7 +1141,7 @@ function wppaToggleExif( id, count ) {
|
|
1133 |
'</tbody>' .
|
1134 |
'</table>' );
|
1135 |
|
1136 |
-
wppa_echo( '<!-- Section 2 -->'
|
1137 |
|
1138 |
if ( ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) ||
|
1139 |
( wppa_switch( 'enable_panorama' ) ) ||
|
@@ -1171,7 +1179,7 @@ function wppaToggleExif( id, count ) {
|
|
1171 |
$files = wppa_glob( WPPA_UPLOAD_PATH . '/stereo/' . $id . '-*.*' );
|
1172 |
|
1173 |
if ( empty( $files ) ) {
|
1174 |
-
wppa_echo( __( 'None', 'wp-photo-album-plus' ) . '. '
|
1175 |
}
|
1176 |
else {
|
1177 |
sort( $files );
|
@@ -1180,16 +1188,17 @@ function wppaToggleExif( id, count ) {
|
|
1180 |
wppa_echo(
|
1181 |
'<a href="' . str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $file ) . '" target="_blank">' .
|
1182 |
basename( $file ) .
|
1183 |
-
'</a>'
|
1184 |
$c++;
|
1185 |
if ( $c == count( $files ) ) {
|
1186 |
-
wppa_echo( '. '
|
1187 |
}
|
1188 |
else {
|
1189 |
-
wppa_echo( ', '
|
1190 |
}
|
1191 |
}
|
1192 |
}
|
|
|
1193 |
}
|
1194 |
|
1195 |
// Panorama
|
@@ -1227,8 +1236,9 @@ function wppaToggleExif( id, count ) {
|
|
1227 |
}
|
1228 |
}
|
1229 |
else {
|
1230 |
-
wppa_echo( __( 'Too narrow for panorama.', 'wp-photo-album-plus' )
|
1231 |
}
|
|
|
1232 |
}
|
1233 |
|
1234 |
// Watermark
|
@@ -1243,7 +1253,7 @@ function wppaToggleExif( id, count ) {
|
|
1243 |
$has_source = wppa_is_file( wppa_get_source_path( $id ) );
|
1244 |
$can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
|
1245 |
if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
|
1246 |
-
wppa_echo( ' ' . __( 'Watermark:', 'wp-photo-album-plus' ) . ' '
|
1247 |
wppa_echo(
|
1248 |
'<select' .
|
1249 |
' id="wmfsel_' . $id . '"' .
|
@@ -1260,7 +1270,7 @@ function wppaToggleExif( id, count ) {
|
|
1260 |
'</select>' .
|
1261 |
'<input' .
|
1262 |
' type="button"' .
|
1263 |
-
' class="button
|
1264 |
' value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"' .
|
1265 |
' onclick="wppaTryWatermark( ' . $id . ', ' . $has_source . ', ' . $can_remove . ' )"' .
|
1266 |
' />' .
|
@@ -1276,9 +1286,9 @@ function wppaToggleExif( id, count ) {
|
|
1276 |
wppa_echo(
|
1277 |
__( 'Watermark:', 'wp-photo-album-plus' ) . ' ' .
|
1278 |
__( 'File:', 'wp-photo-album-plus' ) . ' ' . strip_tags( basename( $wmfile ) ) . ' ' .
|
1279 |
-
__( 'Pos:', 'wp-photo-album-plus' ) . ' ' . strip_tags( $wmpos )
|
1280 |
}
|
1281 |
-
wppa_echo(
|
1282 |
}
|
1283 |
|
1284 |
wppa_echo(
|
@@ -1306,26 +1316,31 @@ function wppaToggleExif( id, count ) {
|
|
1306 |
wppa_echo( '
|
1307 |
<input
|
1308 |
type="button"
|
|
|
1309 |
onclick="wppaTryRotLeft( ' . $id . ' )"
|
1310 |
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1311 |
/>
|
1312 |
<input
|
1313 |
type="button"
|
|
|
1314 |
onclick="wppaTryRot180( ' . $id . ' )"
|
1315 |
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1316 |
/>
|
1317 |
<input
|
1318 |
type="button"
|
|
|
1319 |
onclick="wppaTryRotRight( ' . $id . ' )"
|
1320 |
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1321 |
/>
|
1322 |
<input
|
1323 |
type="button"
|
|
|
1324 |
onclick="wppaTryFlip( ' . $id . ' )"
|
1325 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1326 |
/>
|
1327 |
<input
|
1328 |
type="button"
|
|
|
1329 |
onclick="wppaTryFlop( ' . $id . ' )"
|
1330 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' |"
|
1331 |
/>' );
|
@@ -1337,6 +1352,7 @@ function wppaToggleExif( id, count ) {
|
|
1337 |
wppa_echo( '
|
1338 |
<input
|
1339 |
type="button"
|
|
|
1340 |
title="' . esc_attr( __( 'Remake display file and thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1341 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
1342 |
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
@@ -1348,6 +1364,7 @@ function wppaToggleExif( id, count ) {
|
|
1348 |
wppa_echo( '
|
1349 |
<input
|
1350 |
type="button"
|
|
|
1351 |
title="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1352 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
1353 |
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
@@ -1378,7 +1395,7 @@ function wppaToggleExif( id, count ) {
|
|
1378 |
id="target-' . $id . '"
|
1379 |
style="max-width:350px">' .
|
1380 |
$album_select[$album] . '
|
1381 |
-
</select>' );
|
1382 |
}
|
1383 |
else {
|
1384 |
wppa_echo(
|
@@ -1388,24 +1405,24 @@ function wppaToggleExif( id, count ) {
|
|
1388 |
type="number"
|
1389 |
style="height:20px"
|
1390 |
placeholder="' . __( 'Album id', 'wp-photo-album-plus' ) . '"
|
1391 |
-
/>' );
|
1392 |
}
|
1393 |
-
wppa_echo(
|
1394 |
-
' ', 'post' );
|
1395 |
|
1396 |
wppa_echo(
|
1397 |
'<input' .
|
1398 |
' type="button"' .
|
|
|
1399 |
' onclick="wppaTryMove( ' . $id . ', ' . $b_is_video . ' )"' .
|
1400 |
' value="' . ( $b_is_video ? $mvt : $mpt ) . '"' .
|
1401 |
' />' .
|
1402 |
-
|
1403 |
'<input' .
|
1404 |
' type="button"' .
|
|
|
1405 |
' onclick="wppaTryCopy( ' . $id . ', ' . $b_is_video . ' )"' .
|
1406 |
' value="' . ( $b_is_video ? $cvt : $cpt ) . '"' .
|
1407 |
-
' />'
|
1408 |
-
' ' );
|
1409 |
}
|
1410 |
|
1411 |
// Delete
|
@@ -1414,23 +1431,24 @@ function wppaToggleExif( id, count ) {
|
|
1414 |
wppa_echo(
|
1415 |
'<input' .
|
1416 |
' type="button"' .
|
|
|
1417 |
' style="color:'.($deleted?'green':'red').'"' .
|
1418 |
' onclick="wppaTry' . ( $deleted ? 'Undelete' : 'Delete' ) . '( ' . $id . ', ' . $b_is_video . ' )"' .
|
1419 |
( $deleted ?
|
1420 |
' value="' . ( $b_is_video ? esc_attr( __( 'Undelete video', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Undelete photo', 'wp-photo-album-plus' ) ) ) .'"' :
|
1421 |
' value="' . ( $b_is_video ? esc_attr( __( 'Delete video', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Delete photo', 'wp-photo-album-plus' ) ) ) . '"' ) .
|
1422 |
' />' .
|
1423 |
-
|
1424 |
|
1425 |
if ( $deleted ) {
|
1426 |
wppa_echo( '
|
1427 |
<input
|
1428 |
type="button"
|
|
|
1429 |
style="color:red"
|
1430 |
onclick="wppaTryDelete( ' . $id . ', ' . $b_is_video . ', true )"
|
1431 |
value="' . esc_attr( __( 'Remove permanently', 'wp-photo-album-plus' ) ) . '"
|
1432 |
-
/>
|
1433 |
-
' );
|
1434 |
}
|
1435 |
}
|
1436 |
}
|
@@ -1440,6 +1458,7 @@ function wppaToggleExif( id, count ) {
|
|
1440 |
wppa_echo(
|
1441 |
'<input' .
|
1442 |
' type="button"' .
|
|
|
1443 |
' onclick="jQuery( \'#re-up-' . $id . '\' ).css( \'display\', \'inline-block\' )"' .
|
1444 |
' value="' . esc_attr( __( 'Re-upload file', 'wp-photo-album-plus' ) ) . '"' .
|
1445 |
' />' .
|
@@ -1459,7 +1478,7 @@ function wppaToggleExif( id, count ) {
|
|
1459 |
' value="' . esc_attr( __( 'Upload', 'wp-photo-album-plus' ) ) . '"' .
|
1460 |
' />' .
|
1461 |
'</form>' .
|
1462 |
-
'</div>' );
|
1463 |
}
|
1464 |
|
1465 |
wppa_echo(
|
@@ -1491,102 +1510,114 @@ function wppaToggleExif( id, count ) {
|
|
1491 |
wppa_echo( '
|
1492 |
<input
|
1493 |
type="button"
|
|
|
1494 |
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
1495 |
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1496 |
-
/>
|
1497 |
|
1498 |
// Rotat 180
|
1499 |
wppa_echo( '
|
1500 |
<input
|
1501 |
type="button"
|
|
|
1502 |
onclick="wppaTryMagick( ' . $id . ', \'magickrot180\' )"
|
1503 |
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1504 |
-
/>
|
1505 |
|
1506 |
// Rotate right
|
1507 |
wppa_echo( '
|
1508 |
<input
|
1509 |
type="button"
|
|
|
1510 |
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
1511 |
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1512 |
-
/>
|
1513 |
|
1514 |
// Flip
|
1515 |
wppa_echo( '
|
1516 |
<input
|
1517 |
type="button"
|
|
|
1518 |
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
1519 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1520 |
title="-flip"
|
1521 |
-
/>
|
1522 |
|
1523 |
// Flop
|
1524 |
wppa_echo( '
|
1525 |
<input
|
1526 |
type="button"
|
|
|
1527 |
onclick="wppaTryMagick( ' . $id . ', \'magickflop\' )"
|
1528 |
value="' . esc_attr( __( 'Flop', 'wp-photo-album-plus' ) ) . ' |"
|
1529 |
title="-flop"
|
1530 |
-
/>
|
1531 |
|
1532 |
// Enhance
|
1533 |
wppa_echo( '
|
1534 |
<input
|
1535 |
type="button"
|
|
|
1536 |
onclick="wppaTryMagick( ' . $id . ', \'enhance\' )"
|
1537 |
value="' . esc_attr( __( 'Enhance', 'wp-photo-album-plus' ) ) . '"
|
1538 |
title="-enhance"
|
1539 |
-
/>
|
1540 |
|
1541 |
// Sharpen
|
1542 |
wppa_echo( '
|
1543 |
<input
|
1544 |
type="button"
|
|
|
1545 |
onclick="wppaTryMagick( ' . $id . ', \'sharpen\' )"
|
1546 |
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
1547 |
title="-sharpen 0x1"
|
1548 |
-
/>
|
1549 |
|
1550 |
// Blur
|
1551 |
wppa_echo( '
|
1552 |
<input
|
1553 |
type="button"
|
|
|
1554 |
onclick="wppaTryMagick( ' . $id . ', \'blur\' )"
|
1555 |
value="' . esc_attr( __( 'Blur', 'wp-photo-album-plus' ) ) . '"
|
1556 |
title="-blur 0x1"
|
1557 |
-
/>
|
1558 |
|
1559 |
// Auto gamma
|
1560 |
wppa_echo( '
|
1561 |
<input
|
1562 |
type="button"
|
|
|
1563 |
onclick="wppaTryMagick( ' . $id . ', \'auto-gamma\' )"
|
1564 |
value="' . esc_attr( __( 'Auto Gamma', 'wp-photo-album-plus' ) ) . '"
|
1565 |
title="-auto-gamma"
|
1566 |
-
/>
|
1567 |
|
1568 |
// Auto level
|
1569 |
wppa_echo( '
|
1570 |
<input
|
1571 |
type="button"
|
|
|
1572 |
onclick="wppaTryMagick( ' . $id . ', \'auto-level\' )"
|
1573 |
value="' . esc_attr( __( 'Auto Level', 'wp-photo-album-plus' ) ) . '"
|
1574 |
title="-auto-level"
|
1575 |
-
/>
|
1576 |
|
1577 |
// Contrast+
|
1578 |
wppa_echo( '
|
1579 |
<input
|
1580 |
type="button"
|
|
|
1581 |
onclick="wppaTryMagick( ' . $id . ', \'contrast-p\' )"
|
1582 |
value="' . esc_attr( __( 'Contrast+', 'wp-photo-album-plus' ) ) . '"
|
1583 |
title="-brightness-contrast 0x5"
|
1584 |
-
/>
|
1585 |
|
1586 |
// Contrast-
|
1587 |
wppa_echo( '
|
1588 |
<input
|
1589 |
type="button"
|
|
|
1590 |
onclick="wppaTryMagick( ' . $id . ', \'contrast-m\' )"
|
1591 |
value="' . esc_attr( __( 'Contrast-', 'wp-photo-album-plus' ) ) . '"
|
1592 |
title="-brightness-contrast 0x-5"
|
@@ -1596,6 +1627,7 @@ function wppaToggleExif( id, count ) {
|
|
1596 |
wppa_echo( '
|
1597 |
<input
|
1598 |
type="button"
|
|
|
1599 |
onclick="wppaTryMagick( ' . $id . ', \'brightness-p\' )"
|
1600 |
value="' . esc_attr( __( 'Brightness+', 'wp-photo-album-plus' ) ) . '"
|
1601 |
title="-brightness-contrast 5"
|
@@ -1605,6 +1637,7 @@ function wppaToggleExif( id, count ) {
|
|
1605 |
wppa_echo( '
|
1606 |
<input
|
1607 |
type="button"
|
|
|
1608 |
onclick="wppaTryMagick( ' . $id . ', \'brightness-m\' )"
|
1609 |
value="' . esc_attr( __( 'Brightness-', 'wp-photo-album-plus' ) ) . '"
|
1610 |
title="-brightness-contrast -5"
|
@@ -1614,6 +1647,7 @@ function wppaToggleExif( id, count ) {
|
|
1614 |
wppa_echo( '
|
1615 |
<input
|
1616 |
type="button"
|
|
|
1617 |
onclick="wppaTryMagick( ' . $id . ', \'despeckle\' )"
|
1618 |
value="' . esc_attr( __( 'Despeckle', 'wp-photo-album-plus' ) ) . '"
|
1619 |
title="-despeckle"
|
@@ -1623,6 +1657,7 @@ function wppaToggleExif( id, count ) {
|
|
1623 |
wppa_echo( '
|
1624 |
<input
|
1625 |
type="button"
|
|
|
1626 |
onclick="wppaTryMagick( ' . $id . ', \'lineargray\' )"
|
1627 |
value="' . esc_attr( __( 'Linear gray', 'wp-photo-album-plus' ) ) . '"
|
1628 |
title="-colorspace gray"
|
@@ -1632,6 +1667,7 @@ function wppaToggleExif( id, count ) {
|
|
1632 |
wppa_echo( '
|
1633 |
<input
|
1634 |
type="button"
|
|
|
1635 |
onclick="wppaTryMagick( ' . $id . ', \'nonlineargray\' )"
|
1636 |
value="' . esc_attr( __( 'Non-linear gray', 'wp-photo-album-plus' ) ) . '"
|
1637 |
title="-grayscale Rec709Luma"
|
@@ -1641,6 +1677,7 @@ function wppaToggleExif( id, count ) {
|
|
1641 |
wppa_echo( '
|
1642 |
<input
|
1643 |
type="button"
|
|
|
1644 |
onclick="wppaTryMagick( ' . $id . ', \'charcoal\' )"
|
1645 |
value="' . esc_attr( __( 'Charcoal', 'wp-photo-album-plus' ) ) . '"
|
1646 |
title="-charcoal"
|
@@ -1650,6 +1687,7 @@ function wppaToggleExif( id, count ) {
|
|
1650 |
wppa_echo( '
|
1651 |
<input
|
1652 |
type="button"
|
|
|
1653 |
onclick="wppaTryMagick( ' . $id . ', \'paint\' )"
|
1654 |
value="' . esc_attr( __( 'Paint', 'wp-photo-album-plus' ) ) . '"
|
1655 |
title="-paint"
|
@@ -1659,6 +1697,7 @@ function wppaToggleExif( id, count ) {
|
|
1659 |
wppa_echo( '
|
1660 |
<input
|
1661 |
type="button"
|
|
|
1662 |
onclick="wppaTryMagick( ' . $id . ', \'sepia\' )"
|
1663 |
value="' . esc_attr( __( 'Sepia', 'wp-photo-album-plus' ) ) . '"
|
1664 |
title="-sepia-tone 80%"
|
@@ -1668,6 +1707,7 @@ function wppaToggleExif( id, count ) {
|
|
1668 |
wppa_echo( '
|
1669 |
<input
|
1670 |
type="button"
|
|
|
1671 |
onclick="wppaToggleHorizon()"
|
1672 |
value="' . esc_attr( 'Show/hide horizon', 'wp-photo-album-plus' ) . '"
|
1673 |
title="' . esc_attr( 'Toggle horizon reference line on/off', 'wp-photo-album-plus' ) . '"
|
@@ -1677,6 +1717,7 @@ function wppaToggleExif( id, count ) {
|
|
1677 |
wppa_echo( '
|
1678 |
<input
|
1679 |
type="button"
|
|
|
1680 |
onclick="wppaTryMagick( ' . $id . ', \'skyleft\' )"
|
1681 |
value="' . esc_attr( '0.5°', 'wp-photo-album-plus' ) . '"
|
1682 |
title="' . esc_attr( 'Rotate image by 0.5° anticlockwise', 'wp-photo-album-plus' ) . '"
|
@@ -1686,6 +1727,7 @@ function wppaToggleExif( id, count ) {
|
|
1686 |
wppa_echo( '
|
1687 |
<input
|
1688 |
type="button"
|
|
|
1689 |
onclick="wppaTryMagick( ' . $id . ', \'skyright\' )"
|
1690 |
value="' . esc_attr( '-0.5°', 'wp-photo-album-plus' ) . '"
|
1691 |
title="' . esc_attr( 'Rotate image by 0.5° clockwise', 'wp-photo-album-plus' ) . '"
|
@@ -1695,6 +1737,7 @@ function wppaToggleExif( id, count ) {
|
|
1695 |
wppa_echo( '
|
1696 |
<input
|
1697 |
type="button"
|
|
|
1698 |
id="button-' . $id . '"
|
1699 |
value="Crop"
|
1700 |
title=""
|
@@ -1723,7 +1766,7 @@ function wppaToggleExif( id, count ) {
|
|
1723 |
'<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>' .
|
1724 |
'<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>' .
|
1725 |
'<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>' .
|
1726 |
-
'</select>' );
|
1727 |
|
1728 |
if ( $dflt == 'ratio' ) {
|
1729 |
$value = $ratio;
|
@@ -1752,14 +1795,15 @@ function wppaToggleExif( id, count ) {
|
|
1752 |
sanitize_text_field( $magickstack ) .
|
1753 |
'</span>' .
|
1754 |
' ' .
|
1755 |
-
'<input
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
|
|
1763 |
'</td>' .
|
1764 |
'</tr>' );
|
1765 |
|
@@ -2055,7 +2099,7 @@ function wppaToggleExif( id, count ) {
|
|
2055 |
'<br>' .
|
2056 |
'<span class="description">' .
|
2057 |
__( 'If you want this link to be used, check \'PS Overrule\' checkbox in table VI.' , 'wp-photo-album-plus' ) .
|
2058 |
-
'</span>'
|
2059 |
}
|
2060 |
wppa_echo(
|
2061 |
'</td>' .
|
@@ -2174,7 +2218,7 @@ function wppaToggleExif( id, count ) {
|
|
2174 |
'</tbody>' .
|
2175 |
'</table>' );
|
2176 |
|
2177 |
-
wppa_echo( '<!-- Section 5 -->'
|
2178 |
|
2179 |
// IPTC
|
2180 |
if ( ! $quick ) {
|
@@ -2260,6 +2304,7 @@ function wppaToggleExif( id, count ) {
|
|
2260 |
|
2261 |
foreach ( $exifs as $exif ) {
|
2262 |
$desc = $exif['description'];
|
|
|
2263 |
if ( is_serialized( $desc ) ) {
|
2264 |
$desc = 'Array(' . count( wppa_unserialize( $desc ) ) . ')';
|
2265 |
}
|
@@ -2279,8 +2324,8 @@ function wppaToggleExif( id, count ) {
|
|
2279 |
}
|
2280 |
|
2281 |
wppa_echo( '
|
2282 |
-
<td style="padding:0 4px">' . $desc . '</td>
|
2283 |
-
<td style="padding:0 4px">' . wppa_format_exif( $exif['tag'], $exif['description'], $brand ) . '</td>
|
2284 |
</tr>' );
|
2285 |
|
2286 |
}
|
@@ -2291,7 +2336,7 @@ function wppaToggleExif( id, count ) {
|
|
2291 |
}
|
2292 |
}
|
2293 |
|
2294 |
-
wppa_echo( '<!-- Section 6 -->'
|
2295 |
|
2296 |
// Comments
|
2297 |
if ( ! $quick ) {
|
@@ -2346,7 +2391,7 @@ function wppaToggleExif( id, count ) {
|
|
2346 |
elseif ( $comment['status'] == 'approved' ) _e( 'Approved' , 'wp-photo-album-plus' );
|
2347 |
elseif ( $comment['status'] == 'spam' ) _e( 'Spam' , 'wp-photo-album-plus' );
|
2348 |
elseif ( $comment['status'] == 'trash' ) _e( 'Trash' , 'wp-photo-album-plus' );
|
2349 |
-
wppa_echo( '</td>'
|
2350 |
}
|
2351 |
wppa_echo( '<td style="padding:0 4px">'.$comment['comment'].'</td>
|
2352 |
</tr>' );
|
@@ -2670,12 +2715,12 @@ function wppaTryMove( id, video ) {
|
|
2670 |
<option value="pending"><?php _e( 'Pending' , 'wp-photo-album-plus' ) ?></option>
|
2671 |
<option value="publish"><?php _e( 'Publish' , 'wp-photo-album-plus' ) ?></option>
|
2672 |
<?php if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) $dis = ' disabled'; else $dis = ''; ?>
|
2673 |
-
<option value="featured"<?php wppa_echo( $dis
|
2674 |
-
<option value="gold" <?php wppa_echo( $dis
|
2675 |
-
<option value="silver" <?php wppa_echo( $dis
|
2676 |
-
<option value="bronze" <?php wppa_echo( $dis
|
2677 |
-
<option value="scheduled" <?php wppa_echo( $dis
|
2678 |
-
<option value="private" <?php wppa_echo( $dis
|
2679 |
</select>
|
2680 |
<!-- Owner -->
|
2681 |
<?php $users = wppa_get_users();
|
@@ -2696,7 +2741,7 @@ function wppaTryMove( id, video ) {
|
|
2696 |
<input type="submit" onclick="return wppaBulkDoitOnClick()" class="button-primary" value="<?php _e( 'Doit!' , 'wp-photo-album-plus' ) ?>" />
|
2697 |
<?php
|
2698 |
if ( wppa_is_mobile() ) {
|
2699 |
-
wppa_echo( '<br>'
|
2700 |
}
|
2701 |
?>
|
2702 |
<?php $nextafterselhtml =
|
@@ -2707,7 +2752,7 @@ function wppaTryMove( id, video ) {
|
|
2707 |
'</select>';
|
2708 |
wppa_echo( sprintf( __( 'Go to %s after Doit!.', 'wp-photo-album-plus' ), $nextafterselhtml ) );
|
2709 |
if ( wppa_is_mobile() ) {
|
2710 |
-
wppa_echo( '<br>'
|
2711 |
}
|
2712 |
?>
|
2713 |
|
@@ -2729,7 +2774,7 @@ function wppaTryMove( id, video ) {
|
|
2729 |
/>
|
2730 |
<?php _e('Confirm move', 'wp-photo-album-plus' ) ?>
|
2731 |
|
2732 |
-
<?php wppa_echo( '<small style="float:right"> (' . count( $photos ) . ')</small>'
|
2733 |
|
2734 |
?>
|
2735 |
</h3>
|
@@ -2769,11 +2814,11 @@ function wppaTryMove( id, video ) {
|
|
2769 |
}
|
2770 |
|
2771 |
$maxsize = wppa_get_minisize(); ?>
|
2772 |
-
<tr id="photoitem-<?php wppa_echo( $photo['id']
|
2773 |
<!-- Checkbox -->
|
2774 |
<td>
|
2775 |
-
<input type="hidden" id="photo-nonce-<?php wppa_echo( $photo['id']
|
2776 |
-
<input type="checkbox" name="wppa-bulk-photo[<?php wppa_echo( $photo['id']
|
2777 |
</td>
|
2778 |
<!-- ID and delete link -->
|
2779 |
<td><?php
|
@@ -2832,25 +2877,25 @@ function wppaTryMove( id, video ) {
|
|
2832 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
2833 |
' style="max-width:' . $maxsize . 'px;max-height:' . $maxsize . 'px"' .
|
2834 |
' />' .
|
2835 |
-
'</a>'
|
2836 |
}
|
2837 |
?>
|
2838 |
</td>
|
2839 |
<!-- Name, size, move -->
|
2840 |
<!-- Name -->
|
2841 |
<td style="width:25%">
|
2842 |
-
<input type="text" style="width:300px" id="pname-<?php wppa_echo( $photo['id']
|
2843 |
<!-- Size -->
|
2844 |
<?php
|
2845 |
if ( wppa_is_video( $photo['id'] ) ) {
|
2846 |
-
wppa_echo( '<br>'.strval(intval(wppa_get_videox( $photo['id'] ))).' x '.strval(intval(wppa_get_videoy( $photo['id'] ))).' px.'
|
2847 |
}
|
2848 |
else {
|
2849 |
$sp = wppa_get_source_path( $photo['id'] );
|
2850 |
if ( is_file( $sp ) ) {
|
2851 |
$ima = getimagesize( $sp );
|
2852 |
if ( is_array( $ima ) ) {
|
2853 |
-
wppa_echo( '<br>'.$ima['0'].' x '.$ima['1'].' px.'
|
2854 |
}
|
2855 |
}
|
2856 |
}
|
@@ -2888,21 +2933,21 @@ function wppaTryMove( id, video ) {
|
|
2888 |
</td>
|
2889 |
<!-- Description -->
|
2890 |
<td style="width:25%">
|
2891 |
-
<textarea class="wppa-bulk-dec" style="height:50px; width:100%" onchange="wppaAjaxUpdatePhoto( <?php wppa_echo( $photo['id']
|
2892 |
</td>
|
2893 |
<!-- Status -->
|
2894 |
<td>
|
2895 |
<?php if ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) { ?>
|
2896 |
-
<select id="status-<?php wppa_echo( $photo['id']
|
2897 |
-
<option value="pending" <?php if ( $photo['status']=='pending' ) wppa_echo( 'selected'
|
2898 |
-
<option value="publish" <?php if ( $photo['status']=='publish' ) wppa_echo( 'selected'
|
2899 |
<?php if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) $dis = ' disabled'; else $dis = ''; ?>
|
2900 |
-
<option value="featured" <?php if ( $photo['status']=='featured' ) wppa_echo( 'selected'
|
2901 |
-
<option value="gold" <?php if ( $photo['status'] == 'gold' ) wppa_echo( 'selected'
|
2902 |
-
<option value="silver" <?php if ( $photo['status'] == 'silver' ) wppa_echo( 'selected'
|
2903 |
-
<option value="bronze" <?php if ( $photo['status'] == 'bronze' ) wppa_echo( 'selected'
|
2904 |
-
<option value="scheduled" <?php if ( $photo['status'] == 'scheduled' ) wppa_echo( 'selected'
|
2905 |
-
<option value="private" <?php if ( $photo['status'] == 'private' ) wppa_echo( 'selected'
|
2906 |
</select>
|
2907 |
<?php }
|
2908 |
else {
|
@@ -2918,10 +2963,10 @@ function wppaTryMove( id, video ) {
|
|
2918 |
</td>
|
2919 |
<!-- Owner -->
|
2920 |
<td>
|
2921 |
-
<?php wppa_echo( $photo['owner']
|
2922 |
</td>
|
2923 |
<!-- Remark -->
|
2924 |
-
<td id="remark-<?php wppa_echo( $photo['id']
|
2925 |
<?php _e( 'Not modified' , 'wp-photo-album-plus' ) ?>
|
2926 |
<?php wppa_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$photo['id'].');' ); ?>
|
2927 |
</td>
|
@@ -3080,7 +3125,7 @@ global $wpdb;
|
|
3080 |
$mt = ( $mh - ( $imgs[1]/$imgs[0] * $mw ) ) / '2' + '15';
|
3081 |
}
|
3082 |
?>
|
3083 |
-
<li id="photoitem-<?php wppa_echo( $photo['id']
|
3084 |
<?php if ( wppa_is_video( $photo['id'] ) ) { ?>
|
3085 |
<?php $id = $photo['id'] ?>
|
3086 |
<?php $imgstyle = 'max-width:'.$mw.'px;max-height:'.$mh.'px;margin-top:'.$mt.'px;' ?>
|
@@ -3110,18 +3155,18 @@ global $wpdb;
|
|
3110 |
'<img' .
|
3111 |
' class="wppa-bulk-thumb"' .
|
3112 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
3113 |
-
' style="max-width:' . $mw . 'px;max-height:' . $mh . 'px;margin-top:' . $mt . 'px" />'
|
3114 |
} ?>
|
3115 |
-
<div style="font-size:9px; position:absolute; bottom:24px; text-align:center; width:<?php wppa_echo( $size
|
3116 |
-
<div style="text-align: center; width: <?php wppa_echo( $size
|
3117 |
-
<span style="margin-left:15px;float:left"><?php wppa_echo( __( 'Id: ' , 'wp-photo-album-plus' ).$photo['id']
|
3118 |
<?php if ( wppa_is_video( $photo['id'] ) )_e('Video', 'wp-photo-album-plus' ); ?>
|
3119 |
<?php if ( wppa_has_audio( $photo['id'] ) ) _e('Audio', 'wp-photo-album-plus' ); ?>
|
3120 |
-
<span style="float:right; margin-right:15px"><?php wppa_echo( __( 'Ord: ' , 'wp-photo-album-plus' ).'<span id="wppa-seqno-'.$photo['id'].'">'.$photo['p_order']
|
3121 |
</div>
|
3122 |
-
<input type="hidden" id="photo-nonce-<?php wppa_echo( $photo['id']
|
3123 |
-
<input type="hidden" class="wppa-sort-item" value="<?php wppa_echo( $photo['id']
|
3124 |
-
<input type="hidden" class="wppa-sort-seqn" id="wppa-sort-seqn-<?php wppa_echo( $photo['id']
|
3125 |
</li>
|
3126 |
<?php } ?>
|
3127 |
</ul>
|
@@ -3130,7 +3175,7 @@ global $wpdb;
|
|
3130 |
<?php
|
3131 |
}
|
3132 |
else {
|
3133 |
-
wppa_echo( '<h3>'.__( 'The album is empty.' , 'wp-photo-album-plus' ).'</h3>'
|
3134 |
}
|
3135 |
}
|
3136 |
else {
|
@@ -3376,7 +3421,7 @@ function wppa_fe_edit_photo( $photo ) {
|
|
3376 |
wppa_get_imgalt( $photo ) .
|
3377 |
' />' .
|
3378 |
' ' .
|
3379 |
-
wppa_opt( 'fe_edit_caption' ) . '</h3>'
|
3380 |
|
3381 |
// Open form
|
3382 |
wppa_echo(
|
@@ -3401,7 +3446,7 @@ function wppa_fe_edit_photo( $photo ) {
|
|
3401 |
// Items
|
3402 |
foreach ( array_keys( $items ) as $idx ) {
|
3403 |
if ( $titles[$idx] && $doit[$idx] ) {
|
3404 |
-
wppa_echo( '<h6>' . $titles[$idx] . '</h6>'
|
3405 |
|
3406 |
if ( wppa_is_int( substr( $items[$idx], -1 ) ) ) {
|
3407 |
$value = stripslashes( $custom_data[substr( $items[$idx], -1 )] );
|
@@ -3454,10 +3499,10 @@ function wppa_fe_edit_photo( $photo ) {
|
|
3454 |
' />' );
|
3455 |
|
3456 |
// Close form
|
3457 |
-
wppa_echo( '</form>'
|
3458 |
|
3459 |
// Close page
|
3460 |
-
wppa_echo( '</div>'
|
3461 |
|
3462 |
}
|
3463 |
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
20 |
$photo = wppa_get( 'photo', '0', 'int' );
|
21 |
$thumb = wppa_cache_thumb( $photo );
|
22 |
if ( $thumb['owner'] == wppa_get_user() ) {
|
23 |
+
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>' );
|
24 |
wppa_album_photos( '', $photo );
|
25 |
+
wppa_echo( '</div>' );
|
26 |
}
|
27 |
else {
|
28 |
wp_die( 'You do not have the rights to do this' );
|
31 |
|
32 |
// Edit all photos owned by current user
|
33 |
else {
|
34 |
+
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Edit photos', 'wp-photo-album-plus' ) . '</h2>' );
|
35 |
wppa_album_photos( '', '', wppa_get_user() );
|
36 |
+
wppa_echo( '</div>' );
|
37 |
}
|
38 |
}
|
39 |
|
45 |
$just_edit = wppa_get( 'just-edit' );
|
46 |
|
47 |
if ( $photo && $just_edit && wppa_user_is( 'administrator' ) ) {
|
48 |
+
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Edit photo', 'wp-photo-album-plus' ) . '</h2>' . wppa_get( 'just-edit' ) );
|
49 |
wppa_album_photos( '', $photo, '', false );
|
50 |
+
wppa_echo( '</div>' );
|
51 |
}
|
52 |
else {
|
53 |
+
wppa_echo( '<div class="wrap"><h2>' . esc_html__( 'Moderate photos' , 'wp-photo-album-plus' ) . '</h2>' );
|
54 |
if ( wppa_switch( 'moderate_bulk' ) ) {
|
55 |
wppa_album_photos_bulk( 'moderate' );
|
56 |
}
|
57 |
else {
|
58 |
wppa_album_photos( '', $photo, '', true );
|
59 |
}
|
60 |
+
wppa_echo( '</div>' );
|
61 |
}
|
62 |
}
|
63 |
|
198 |
|
199 |
// Single photo moderate requested
|
200 |
if ( $photo ) {
|
201 |
+
wppa_echo( '<p>' . esc_html__( 'This photo is no longer awaiting moderation.' , 'wp-photo-album-plus' ) . '</p>' );
|
202 |
}
|
203 |
|
204 |
// Multiple photos to moderate requested
|
205 |
else {
|
206 |
+
wppa_echo( '<p>' . esc_html__( 'There are no photos awaiting moderation at this time.', 'wp-photo-album-plus' ) . '</p>' );
|
207 |
}
|
208 |
|
209 |
// If i am admin, i can edit all photos here, sorted by timestamp desc
|
210 |
if ( wppa_user_is( 'administrator' ) ) {
|
211 |
+
wppa_echo( '<h3>' . esc_html__( 'Manage all photos by timestamp', 'wp-photo-album-plus' ) . '</h3>' );
|
212 |
|
213 |
$photos = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
|
214 |
ORDER BY timestamp DESC
|
249 |
<span style="color:red">' .
|
250 |
sprintf( esc_html__( 'Photo %s has been removed.', 'wp-photo-album-plus' ), $photo ) . '
|
251 |
</span>
|
252 |
+
</div>' );
|
253 |
}
|
254 |
|
255 |
// A collection of photos requested
|
257 |
|
258 |
// Search
|
259 |
if ( wppa_get( 'searchstring' ) ) {
|
260 |
+
wppa_echo( '<h3>' . esc_html__( 'No photos matching your search criteria.', 'wp-photo-album-plus' ) . '</h3>' );
|
261 |
}
|
262 |
|
263 |
// Album
|
264 |
else {
|
265 |
+
wppa_echo( '<h3>' . esc_html__( 'No photos yet in this album.', 'wp-photo-album-plus' ) . '</h3>' );
|
266 |
}
|
267 |
}
|
268 |
|
494 |
wppa_admin_page_links( $page, $pagesize, $count, $link );
|
495 |
|
496 |
// Horizon
|
497 |
+
wppa_echo( '<div id="wppa-horizon"><hr></div>' );
|
498 |
|
499 |
wppa_add_inline_script( 'wppa-admin', 'wppaDragHorizon(document.getElementById("wppa-horizon"))' );
|
500 |
|
565 |
'cenlft' => __( 'center - left' , 'wp-photo-album-plus' ), 'cencen' => __( 'center - center' , 'wp-photo-album-plus' ), 'cenrht' => __( 'center - right' , 'wp-photo-album-plus' ),
|
566 |
'botlft' => __( 'bottom - left' , 'wp-photo-album-plus' ), 'botcen' => __( 'bottom - center' , 'wp-photo-album-plus' ), 'botrht' => __( 'bottom - right' , 'wp-photo-album-plus' ), );
|
567 |
|
568 |
+
$br = wppa_is_phone() ? '<br>' : ' ';
|
569 |
+
|
570 |
// Album for moderate
|
571 |
if ( $modalbum != $album && $album && ! wppa_get( 'just-edit' ) && wppa_get( 'edit-id' ) != 'trash' ) {
|
572 |
wppa_echo( '<h3>' . sprintf( __( 'Edit/Moderate photos from album %s by %s', 'wp-photo-album-plus' ),
|
573 |
'<i>' . sanitize_text_field( wppa_get_album_name( $album ) ) . '</i>',
|
574 |
+
'<i>' . sanitize_user( wppa_get_album_item( $album, 'owner' ) ) . '</i>' ) . '</h3>' );
|
575 |
$modalbum = $album;
|
576 |
}
|
577 |
|
578 |
// Anchor for scroll to
|
579 |
+
wppa_echo( '<a id="photo_' . $id . '"></a>' );
|
580 |
|
581 |
// The photo data
|
582 |
wppa_echo( '
|
672 |
wppa_echo( '
|
673 |
</td>' );
|
674 |
|
675 |
+
if ( wppa_is_phone() ) {
|
676 |
+
wppa_echo( '</tr><tr>' );
|
677 |
+
}
|
678 |
+
|
679 |
// --- More or less static data ---
|
680 |
wppa_echo( '
|
681 |
<td>' .
|
684 |
'ID = ' . strval( intval( $id ) ) . '. ' .
|
685 |
|
686 |
// Crypt
|
687 |
+
__( 'Crypt:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $crypt ) . '. ' . $br .
|
688 |
|
689 |
// Filename
|
690 |
+
__( 'Filename:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $filename ) . '. ' . $br .
|
691 |
|
692 |
// Upload
|
693 |
__( 'Upload:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( wppa_local_date( '', $timestamp ) ) . ' ' .
|
694 |
+
__( 'local time', 'wp-photo-album-plus' ) . '. ' ) . $br;
|
695 |
|
696 |
// Owner
|
697 |
if ( $owner_editable ) {
|
701 |
type="text"
|
702 |
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'owner\', this.value )"
|
703 |
value="' . esc_attr( $owner ) . '"
|
704 |
+
/>' . $br );
|
705 |
}
|
706 |
else {
|
707 |
+
wppa_echo( __( 'By:', 'wp-photo-album-plus' ) . ' ' . htmlspecialchars( $owner ) . '.' . $br );
|
708 |
}
|
709 |
|
710 |
// Album
|
713 |
$album = - ( $album + '9' );
|
714 |
$deleted = true;
|
715 |
}
|
716 |
+
wppa_echo( sprintf( __( 'Album: %d (%s).', 'wp-photo-album-plus' ), strval( intval( $album ) ), htmlspecialchars( wppa_get_album_name( $album ) ) ) . $br );
|
717 |
|
718 |
// Modified
|
719 |
if ( $deleted ) {
|
720 |
wppa_echo( '
|
721 |
<span style="color:red">' .
|
722 |
__( 'Trashed', 'wp-photo-album-plus' ) . '
|
723 |
+
</span>' );
|
724 |
}
|
725 |
else {
|
726 |
if ( $modified > $timestamp ) {
|
729 |
<span id="modified-' . $id . '">' .
|
730 |
wppa_local_date( '', $modified ) . '
|
731 |
</span>' .
|
732 |
+
__( 'local time', 'wp-photo-album-plus' ) );
|
733 |
}
|
734 |
else {
|
735 |
+
wppa_echo( __( 'Not modified', 'wp-photo-album-plus' ) );
|
736 |
}
|
737 |
}
|
738 |
+
wppa_echo( '.' . $br );
|
739 |
|
740 |
// Exif
|
741 |
+
wppa_echo( __( 'EXIF Date:', 'wp-photo-album-plus' ) );
|
742 |
if ( wppa_user_is( 'administrator' ) ) { // Admin may edit exif date
|
743 |
wppa_echo( '
|
744 |
<input
|
749 |
/>' );
|
750 |
}
|
751 |
else {
|
752 |
+
wppa_echo( esc_html( $exifdtm ) . '.' );
|
753 |
}
|
754 |
+
wppa_echo( $br );
|
755 |
|
756 |
// Location
|
757 |
if ( $photo['location'] || wppa_switch( 'geo_edit' ) ) {
|
758 |
wppa_echo(
|
759 |
+
__( 'Location:' , 'wp-photo-album-plus' ) . ' ' );
|
760 |
$loc = $location ? $location : '///';
|
761 |
$geo = explode( '/', $loc );
|
762 |
|
763 |
+
wppa_echo( esc_html( $geo['0'].' '.$geo['1'].'. ' ) );
|
764 |
|
765 |
if ( wppa_switch( 'geo_edit' ) ) {
|
766 |
wppa_echo(
|
778 |
id="lon-' . $id . '"
|
779 |
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'lon\', this.value)"
|
780 |
value="' . esc_attr( $geo['3'] ) . '"
|
781 |
+
/>' . $br );
|
782 |
}
|
783 |
}
|
784 |
|
785 |
// Changeable p_order
|
786 |
+
wppa_echo( __( 'Photo sort order #:', 'wp-photo-album-plus' ) );
|
787 |
if ( $sortby_orderno && ( ! wppa_switch( 'porder_restricted' ) || wppa_user_is( 'administrator' ) ) ) {
|
788 |
wppa_echo( '
|
789 |
<input
|
792 |
value="' . esc_attr( $p_order ) . '"
|
793 |
style="width:30px"
|
794 |
onchange="wppaAjaxUpdatePhoto( ' . $id . ', \'p_order\', this.value)"
|
795 |
+
/>' . $br );
|
796 |
}
|
797 |
else {
|
798 |
+
wppa_echo( ' ' . $p_order . '.' . $br );
|
799 |
}
|
800 |
|
801 |
// Rating
|
803 |
if ( $entries ) {
|
804 |
|
805 |
if ( wppa_opt( 'rating_display_type' ) == 'likes' ) {
|
806 |
+
wppa_echo( __( 'Likes:', 'wp-photo-album-plus' ) . ' ' . strval( intval( $entries ) ) . '.' . $br );
|
807 |
}
|
808 |
else {
|
809 |
wppa_echo(
|
813 |
__( 'Mean value:', 'wp-photo-album-plus' ) .
|
814 |
' ' .
|
815 |
wppa_get_rating_by_id( $id, 'nolabel' ) .
|
816 |
+
'.' . $br );
|
817 |
}
|
818 |
}
|
819 |
else {
|
820 |
+
wppa_echo( __( 'No ratings for this photo.', 'wp-photo-album-plus' ) . $br );
|
821 |
}
|
822 |
$dislikes = wppa_dislike_get( $id );
|
823 |
if ( $dislikes ) {
|
824 |
wppa_echo(
|
825 |
'<span style="color:red">' .
|
826 |
sprintf( _n( 'Disliked by %d visitor', 'Disliked by %d visitors', $dislikes, 'wp-photo-album-plus' ), $dislikes ) . '. ' .
|
827 |
+
'</span>' . $br );
|
828 |
}
|
829 |
$pending = wppa_pendrat_get( $id );
|
830 |
if ( $pending ) {
|
831 |
wppa_echo(
|
832 |
'<span style="color:orange">' .
|
833 |
sprintf( __( '%d pending votes.', 'wp-photo-album-plus' ), $pending ) . ' ' .
|
834 |
+
'</span>' . $br );
|
835 |
}
|
836 |
|
837 |
// Views
|
839 |
wppa_echo(
|
840 |
__( 'Views' , 'wp-photo-album-plus' ) . ': ' .
|
841 |
htmlspecialchars( $views ) .
|
842 |
+
'.' . $br );
|
843 |
}
|
844 |
|
845 |
// Clicks
|
847 |
wppa_echo(
|
848 |
__( 'Clicks', 'wp-photo-album-plus' ) . ': ' .
|
849 |
htmlspecialchars( $clicks ) .
|
850 |
+
'.' . $br );
|
851 |
}
|
852 |
|
853 |
// Downloads
|
855 |
wppa_echo(
|
856 |
__( 'Downloads', 'wp-photo-album-plus' ) . ': ' .
|
857 |
htmlspecialchars( $dlcount ) .
|
858 |
+
'.' . $br );
|
859 |
// }
|
860 |
|
861 |
// Status
|
862 |
wppa_echo( '<br>' .
|
863 |
+
__( 'Status:' , 'wp-photo-album-plus' ) . ' ' );
|
864 |
if ( ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) ) {
|
865 |
if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) {
|
866 |
$dis = ' disabled';
|
907 |
' type="hidden"' .
|
908 |
' id="status-' . $id . '"' .
|
909 |
' value="' . esc_attr( $status ) . '"' .
|
910 |
+
' />' );
|
911 |
if ( $status == 'pending' ) _e( 'Pending', 'wp-photo-album-plus' );
|
912 |
elseif ( $status == 'publish' ) _e( 'Publish', 'wp-photo-album-plus' );
|
913 |
elseif ( $status == 'featured' ) _e( 'Featured', 'wp-photo-album-plus' );
|
922 |
__( 'Note: Featured photos should have a descriptive name; a name a search engine will look for!', 'wp-photo-album-plus' ) .
|
923 |
'</span>' );
|
924 |
}
|
925 |
+
wppa_echo( $br );
|
926 |
|
927 |
// Schedule for delete
|
928 |
if ( wppa_user_is( 'administrator' ) || $owner == wppa_get_user() ) {
|
939 |
' onchange="wppaTryScheduledel( ' . $id . ' )"' .
|
940 |
' />' .
|
941 |
' ' .
|
942 |
+
wppa_get_date_time_select_html( 'delphoto', $id, $may_change ) . $br );
|
|
|
943 |
}
|
944 |
|
945 |
// Update status field
|
951 |
' >' .
|
952 |
( $is_video ? sprintf( __( 'Video %s is not modified yet', 'wp-photo-album-plus' ), $id ) :
|
953 |
sprintf( __( 'Photo %s is not modified yet', 'wp-photo-album-plus' ), $id ) ) .
|
954 |
+
'</span>' );
|
955 |
|
956 |
// New Line
|
957 |
+
wppa_echo( $br . '<br>' );
|
958 |
|
959 |
// --- Available files ---
|
960 |
wppa_echo(
|
961 |
+
__( 'Available files:', 'wp-photo-album-plus' ) . $br );
|
962 |
|
963 |
// Pdf
|
964 |
if ( wppa_is_pdf( $id ) ) {
|
965 |
$sp = wppa_get_source_path( $id );
|
966 |
$fs = wppa_get_filesize( $sp );
|
967 |
+
wppa_echo( __( 'Document file:', 'wp-photo-album-plus' ) . ' ' . $fs . ' ' );
|
968 |
}
|
969 |
|
970 |
// Source
|
971 |
+
wppa_echo( __( 'Source file:', 'wp-photo-album-plus' ) . ' ' );
|
972 |
$sp = wppa_get_o1_source_path( $id );
|
973 |
if ( ! wppa_is_file( $sp ) ) {
|
974 |
$sp = wppa_get_source_path( $id );
|
983 |
$ima = getimagesize( $sp );
|
984 |
wppa_echo(
|
985 |
$ima['0'] . ' x ' . $ima['1'] . ' (' . sprintf('%4.2fMp', ( $ima['0'] * $ima['1'] ) / ( 1024 * 1024 ) ) . ') ' .
|
986 |
+
wppa_get_filesize( $sp ) . '.' . $br );
|
987 |
}
|
988 |
else {
|
989 |
+
wppa_echo( __( 'Unavailable', 'wp-photo-album-plus' ) . '.' . $br );
|
990 |
}
|
991 |
|
992 |
// Display
|
993 |
wppa_echo(
|
994 |
+
( $is_video || $has_audio ? __( 'Poster file:', 'wp-photo-album-plus' ) : __( 'Display file:', 'wp-photo-album-plus' ) ) . ' ' );
|
995 |
$dp = wppa_get_photo_path( $id );
|
996 |
if ( is_file( $dp ) ) {
|
997 |
wppa_echo(
|
998 |
'<span id="photox-'.$id.'">'.wppa_get_photox( $id ).'</span>' .
|
999 |
' x ' .
|
1000 |
'<span id="photoy-'.$id.'">'.wppa_get_photoy( $id ).'</span>' .
|
1001 |
+
' ' . '<span id="photofilesize-' . $id . '">' . wppa_get_filesize( $dp ) . '</span>.' . $br );
|
1002 |
}
|
1003 |
else {
|
1004 |
wppa_echo(
|
1005 |
'<span style="color:red">' .
|
1006 |
__( 'Unavailable', 'wp-photo-album-plus' ) . '. ' .
|
1007 |
+
'</span>.' . $br );
|
1008 |
}
|
1009 |
|
1010 |
// Thumbnail
|
1011 |
if ( ! $is_video ) {
|
1012 |
+
wppa_echo( __( 'Thumbnail file:', 'wp-photo-album-plus' ) . ' ' );
|
1013 |
$tp = wppa_get_thumb_path( $id );
|
1014 |
if ( is_file( $tp ) ) {
|
1015 |
|
1024 |
( $thumblock ? ' checked="checked"' : '' ) .
|
1025 |
' onchange="wppaAjaxUpdatePhoto( ' . strval( intval( $id ) ) . ', \'thumblock\', jQuery(this).prop(\'checked\') ? 1 : 0 )"' .
|
1026 |
' /> ' .
|
1027 |
+
__( 'Locked', 'wp-photo-album-plus' ) . '.' . $br );
|
1028 |
|
1029 |
}
|
1030 |
else {
|
1031 |
wppa_echo(
|
1032 |
'<span style="color:red">' .
|
1033 |
__( 'Unavailable', 'wp-photo-album-plus' ) . '. ' .
|
1034 |
+
'</span>.' . $br );
|
1035 |
}
|
1036 |
}
|
1037 |
|
1038 |
+
wppa_echo( $br );
|
1039 |
+
|
1040 |
// Local CDN
|
1041 |
if ( wppa_cdn( 'admin' ) == 'local' ) {
|
1042 |
+
wppa_echo( __( 'Local CDN files', 'wp-photo-album-plus' ) . ':<span id="cdnfiles-' . $id . '">' . $br );
|
1043 |
$files = wppa_cdn_files( $id );
|
1044 |
if ( is_array( $files ) ) {
|
1045 |
foreach( $files as $file ) {
|
1056 |
>' .
|
1057 |
basename( $file ) .
|
1058 |
' </a>' .
|
1059 |
+
sprintf( '%4.2fkB', $size / 1024 ) . $br );
|
1060 |
}
|
1061 |
}
|
1062 |
}
|
1063 |
+
wppa_echo( '</span>' );
|
1064 |
}
|
1065 |
|
1066 |
// New line
|
1067 |
+
wppa_echo( '<br>' );
|
1068 |
|
1069 |
// Video
|
1070 |
if ( $b_is_video ) {
|
1088 |
if ( $duration ) {
|
1089 |
$duration = intval( $duration * 100 ) / 100;
|
1090 |
if ( $duration < 120.0 ) {
|
1091 |
+
wppa_echo( sprintf( __( 'Duration: %s seconds', 'wp-photo-album-plus' ) ,$duration ) . '. ' );
|
1092 |
}
|
1093 |
else {
|
1094 |
wppa_echo( sprintf( __( 'Duration: %s minutes and %s seconds', 'wp-photo-album-plus' ),
|
1095 |
sprintf( '%d', floor( $duration / 60 ) ),
|
1096 |
sprintf( '%4.2f', $duration % 60 ) ) .
|
1097 |
+
'. ' );
|
1098 |
}
|
1099 |
}
|
1100 |
|
1101 |
+
wppa_echo( __( 'Formats:', 'wp-photo-album-plus' ) . ' ' );
|
1102 |
$c = 0;
|
1103 |
foreach ( $is_video as $fmt ) {
|
1104 |
wppa_echo(
|
1105 |
$fmt . ' ' .
|
1106 |
__( 'Filesize:', 'wp-photo-album-plus' ) . ' ' .
|
1107 |
+
wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) );
|
1108 |
$c++;
|
1109 |
if ( is_array( $is_video ) && $c == count( $is_video ) ) {
|
1110 |
+
wppa_echo( '. ' );
|
1111 |
}
|
1112 |
else {
|
1113 |
+
wppa_echo( ', ' );
|
1114 |
}
|
1115 |
}
|
1116 |
}
|
1117 |
+
wppa_echo( $br );
|
1118 |
|
1119 |
// Audio
|
1120 |
if ( $b_has_audio ) {
|
1121 |
+
wppa_echo( __( 'Formats:', 'wp-photo-album-plus' ) . ' ' );
|
1122 |
$c = 0;
|
1123 |
foreach ( $has_audio as $fmt ) {
|
1124 |
wppa_echo(
|
1125 |
$fmt . ' ' .
|
1126 |
__( 'Filesize:', 'wp-photo-album-plus' ) . ' ' .
|
1127 |
+
wppa_get_filesize( str_replace( 'xxx', $fmt, wppa_get_photo_path( $id, false ) ) ) );
|
1128 |
$c++;
|
1129 |
if ( is_array( $is_video ) && $c == count( $is_video ) ) {
|
1130 |
+
wppa_echo( '. ' );
|
1131 |
}
|
1132 |
else {
|
1133 |
+
wppa_echo( ', ' );
|
1134 |
}
|
1135 |
}
|
1136 |
}
|
1141 |
'</tbody>' .
|
1142 |
'</table>' );
|
1143 |
|
1144 |
+
wppa_echo( '<!-- Section 2 -->' );
|
1145 |
|
1146 |
if ( ( wppa_switch( 'enable_stereo' ) && ! $is_multi ) ||
|
1147 |
( wppa_switch( 'enable_panorama' ) ) ||
|
1179 |
$files = wppa_glob( WPPA_UPLOAD_PATH . '/stereo/' . $id . '-*.*' );
|
1180 |
|
1181 |
if ( empty( $files ) ) {
|
1182 |
+
wppa_echo( __( 'None', 'wp-photo-album-plus' ) . '. ' );
|
1183 |
}
|
1184 |
else {
|
1185 |
sort( $files );
|
1188 |
wppa_echo(
|
1189 |
'<a href="' . str_replace( WPPA_UPLOAD_PATH, WPPA_UPLOAD_URL, $file ) . '" target="_blank">' .
|
1190 |
basename( $file ) .
|
1191 |
+
'</a>' );
|
1192 |
$c++;
|
1193 |
if ( $c == count( $files ) ) {
|
1194 |
+
wppa_echo( '. ' );
|
1195 |
}
|
1196 |
else {
|
1197 |
+
wppa_echo( ', ' );
|
1198 |
}
|
1199 |
}
|
1200 |
}
|
1201 |
+
wppa_echo( $br );
|
1202 |
}
|
1203 |
|
1204 |
// Panorama
|
1236 |
}
|
1237 |
}
|
1238 |
else {
|
1239 |
+
wppa_echo( __( 'Too narrow for panorama.', 'wp-photo-album-plus' ) );
|
1240 |
}
|
1241 |
+
wppa_echo( $br );
|
1242 |
}
|
1243 |
|
1244 |
// Watermark
|
1253 |
$has_source = wppa_is_file( wppa_get_source_path( $id ) );
|
1254 |
$can_remove = ( wppa_opt( 'watermark_file' ) == '--- none ---' ) ? '1' : '0';
|
1255 |
if ( wppa_switch( 'watermark_user' ) || current_user_can( 'wppa_settings' ) ) {
|
1256 |
+
wppa_echo( ' ' . __( 'Watermark:', 'wp-photo-album-plus' ) . ' ' );
|
1257 |
wppa_echo(
|
1258 |
'<select' .
|
1259 |
' id="wmfsel_' . $id . '"' .
|
1270 |
'</select>' .
|
1271 |
'<input' .
|
1272 |
' type="button"' .
|
1273 |
+
' class="wppa-admin-button"' .
|
1274 |
' value="' . esc_attr( __( 'Apply watermark', 'wp-photo-album-plus' ) ) . '"' .
|
1275 |
' onclick="wppaTryWatermark( ' . $id . ', ' . $has_source . ', ' . $can_remove . ' )"' .
|
1276 |
' />' .
|
1286 |
wppa_echo(
|
1287 |
__( 'Watermark:', 'wp-photo-album-plus' ) . ' ' .
|
1288 |
__( 'File:', 'wp-photo-album-plus' ) . ' ' . strip_tags( basename( $wmfile ) ) . ' ' .
|
1289 |
+
__( 'Pos:', 'wp-photo-album-plus' ) . ' ' . strip_tags( $wmpos ) );
|
1290 |
}
|
1291 |
+
wppa_echo( $br );
|
1292 |
}
|
1293 |
|
1294 |
wppa_echo(
|
1316 |
wppa_echo( '
|
1317 |
<input
|
1318 |
type="button"
|
1319 |
+
class="wppa-admin-button"
|
1320 |
onclick="wppaTryRotLeft( ' . $id . ' )"
|
1321 |
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1322 |
/>
|
1323 |
<input
|
1324 |
type="button"
|
1325 |
+
class="wppa-admin-button"
|
1326 |
onclick="wppaTryRot180( ' . $id . ' )"
|
1327 |
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1328 |
/>
|
1329 |
<input
|
1330 |
type="button"
|
1331 |
+
class="wppa-admin-button"
|
1332 |
onclick="wppaTryRotRight( ' . $id . ' )"
|
1333 |
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1334 |
/>
|
1335 |
<input
|
1336 |
type="button"
|
1337 |
+
class="wppa-admin-button"
|
1338 |
onclick="wppaTryFlip( ' . $id . ' )"
|
1339 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1340 |
/>
|
1341 |
<input
|
1342 |
type="button"
|
1343 |
+
class="wppa-admin-button"
|
1344 |
onclick="wppaTryFlop( ' . $id . ' )"
|
1345 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' |"
|
1346 |
/>' );
|
1352 |
wppa_echo( '
|
1353 |
<input
|
1354 |
type="button"
|
1355 |
+
class="wppa-admin-button"
|
1356 |
title="' . esc_attr( __( 'Remake display file and thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1357 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remake\', 0 )"
|
1358 |
value="' . esc_attr( __( 'Remake files', 'wp-photo-album-plus' ) ) . '"
|
1364 |
wppa_echo( '
|
1365 |
<input
|
1366 |
type="button"
|
1367 |
+
class="wppa-admin-button"
|
1368 |
title="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1369 |
onclick="wppaAjaxUpdatePhoto( ' . $id . ', \'remakethumb\', 0 )"
|
1370 |
value="' . esc_attr( __( 'Remake thumbnail file', 'wp-photo-album-plus' ) ) . '"
|
1395 |
id="target-' . $id . '"
|
1396 |
style="max-width:350px">' .
|
1397 |
$album_select[$album] . '
|
1398 |
+
</select>' . $br );
|
1399 |
}
|
1400 |
else {
|
1401 |
wppa_echo(
|
1405 |
type="number"
|
1406 |
style="height:20px"
|
1407 |
placeholder="' . __( 'Album id', 'wp-photo-album-plus' ) . '"
|
1408 |
+
/>' . $br );
|
1409 |
}
|
1410 |
+
wppa_echo( $br );
|
|
|
1411 |
|
1412 |
wppa_echo(
|
1413 |
'<input' .
|
1414 |
' type="button"' .
|
1415 |
+
' class="wppa-admin-button"' .
|
1416 |
' onclick="wppaTryMove( ' . $id . ', ' . $b_is_video . ' )"' .
|
1417 |
' value="' . ( $b_is_video ? $mvt : $mpt ) . '"' .
|
1418 |
' />' .
|
1419 |
+
|
1420 |
'<input' .
|
1421 |
' type="button"' .
|
1422 |
+
' class="wppa-admin-button"' .
|
1423 |
' onclick="wppaTryCopy( ' . $id . ', ' . $b_is_video . ' )"' .
|
1424 |
' value="' . ( $b_is_video ? $cvt : $cpt ) . '"' .
|
1425 |
+
' />' );
|
|
|
1426 |
}
|
1427 |
|
1428 |
// Delete
|
1431 |
wppa_echo(
|
1432 |
'<input' .
|
1433 |
' type="button"' .
|
1434 |
+
' class="wppa-admin-button"' .
|
1435 |
' style="color:'.($deleted?'green':'red').'"' .
|
1436 |
' onclick="wppaTry' . ( $deleted ? 'Undelete' : 'Delete' ) . '( ' . $id . ', ' . $b_is_video . ' )"' .
|
1437 |
( $deleted ?
|
1438 |
' value="' . ( $b_is_video ? esc_attr( __( 'Undelete video', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Undelete photo', 'wp-photo-album-plus' ) ) ) .'"' :
|
1439 |
' value="' . ( $b_is_video ? esc_attr( __( 'Delete video', 'wp-photo-album-plus' ) ) : esc_attr( __( 'Delete photo', 'wp-photo-album-plus' ) ) ) . '"' ) .
|
1440 |
' />' .
|
1441 |
+
$br );
|
1442 |
|
1443 |
if ( $deleted ) {
|
1444 |
wppa_echo( '
|
1445 |
<input
|
1446 |
type="button"
|
1447 |
+
class="wppa-admin-button"
|
1448 |
style="color:red"
|
1449 |
onclick="wppaTryDelete( ' . $id . ', ' . $b_is_video . ', true )"
|
1450 |
value="' . esc_attr( __( 'Remove permanently', 'wp-photo-album-plus' ) ) . '"
|
1451 |
+
/>' . $br );
|
|
|
1452 |
}
|
1453 |
}
|
1454 |
}
|
1458 |
wppa_echo(
|
1459 |
'<input' .
|
1460 |
' type="button"' .
|
1461 |
+
' class="wppa-admin-button"' .
|
1462 |
' onclick="jQuery( \'#re-up-' . $id . '\' ).css( \'display\', \'inline-block\' )"' .
|
1463 |
' value="' . esc_attr( __( 'Re-upload file', 'wp-photo-album-plus' ) ) . '"' .
|
1464 |
' />' .
|
1478 |
' value="' . esc_attr( __( 'Upload', 'wp-photo-album-plus' ) ) . '"' .
|
1479 |
' />' .
|
1480 |
'</form>' .
|
1481 |
+
'</div>' . $br );
|
1482 |
}
|
1483 |
|
1484 |
wppa_echo(
|
1510 |
wppa_echo( '
|
1511 |
<input
|
1512 |
type="button"
|
1513 |
+
class="wppa-admin-button"
|
1514 |
onclick="wppaTryMagick( ' . $id . ', \'magickrotleft\' )"
|
1515 |
value="' . esc_attr( __( 'Rotate left', 'wp-photo-album-plus' ) ) . '"
|
1516 |
+
/>' );
|
1517 |
|
1518 |
// Rotat 180
|
1519 |
wppa_echo( '
|
1520 |
<input
|
1521 |
type="button"
|
1522 |
+
class="wppa-admin-button"
|
1523 |
onclick="wppaTryMagick( ' . $id . ', \'magickrot180\' )"
|
1524 |
value="' . esc_attr( __( 'Rotate 180°', 'wp-photo-album-plus' ) ) . '"
|
1525 |
+
/>' );
|
1526 |
|
1527 |
// Rotate right
|
1528 |
wppa_echo( '
|
1529 |
<input
|
1530 |
type="button"
|
1531 |
+
class="wppa-admin-button"
|
1532 |
onclick="wppaTryMagick( ' . $id . ', \'magickrotright\' )"
|
1533 |
value="' . esc_attr( __( 'Rotate right', 'wp-photo-album-plus' ) ) . '"
|
1534 |
+
/>' );
|
1535 |
|
1536 |
// Flip
|
1537 |
wppa_echo( '
|
1538 |
<input
|
1539 |
type="button"
|
1540 |
+
class="wppa-admin-button"
|
1541 |
onclick="wppaTryMagick( ' . $id . ', \'magickflip\' )"
|
1542 |
value="' . esc_attr( __( 'Flip', 'wp-photo-album-plus' ) ) . ' —"
|
1543 |
title="-flip"
|
1544 |
+
/>' );
|
1545 |
|
1546 |
// Flop
|
1547 |
wppa_echo( '
|
1548 |
<input
|
1549 |
type="button"
|
1550 |
+
class="wppa-admin-button"
|
1551 |
onclick="wppaTryMagick( ' . $id . ', \'magickflop\' )"
|
1552 |
value="' . esc_attr( __( 'Flop', 'wp-photo-album-plus' ) ) . ' |"
|
1553 |
title="-flop"
|
1554 |
+
/>' );
|
1555 |
|
1556 |
// Enhance
|
1557 |
wppa_echo( '
|
1558 |
<input
|
1559 |
type="button"
|
1560 |
+
class="wppa-admin-button"
|
1561 |
onclick="wppaTryMagick( ' . $id . ', \'enhance\' )"
|
1562 |
value="' . esc_attr( __( 'Enhance', 'wp-photo-album-plus' ) ) . '"
|
1563 |
title="-enhance"
|
1564 |
+
/>' );
|
1565 |
|
1566 |
// Sharpen
|
1567 |
wppa_echo( '
|
1568 |
<input
|
1569 |
type="button"
|
1570 |
+
class="wppa-admin-button"
|
1571 |
onclick="wppaTryMagick( ' . $id . ', \'sharpen\' )"
|
1572 |
value="' . esc_attr( __( 'Sharpen', 'wp-photo-album-plus' ) ) . '"
|
1573 |
title="-sharpen 0x1"
|
1574 |
+
/>' );
|
1575 |
|
1576 |
// Blur
|
1577 |
wppa_echo( '
|
1578 |
<input
|
1579 |
type="button"
|
1580 |
+
class="wppa-admin-button"
|
1581 |
onclick="wppaTryMagick( ' . $id . ', \'blur\' )"
|
1582 |
value="' . esc_attr( __( 'Blur', 'wp-photo-album-plus' ) ) . '"
|
1583 |
title="-blur 0x1"
|
1584 |
+
/>' );
|
1585 |
|
1586 |
// Auto gamma
|
1587 |
wppa_echo( '
|
1588 |
<input
|
1589 |
type="button"
|
1590 |
+
class="wppa-admin-button"
|
1591 |
onclick="wppaTryMagick( ' . $id . ', \'auto-gamma\' )"
|
1592 |
value="' . esc_attr( __( 'Auto Gamma', 'wp-photo-album-plus' ) ) . '"
|
1593 |
title="-auto-gamma"
|
1594 |
+
/>' );
|
1595 |
|
1596 |
// Auto level
|
1597 |
wppa_echo( '
|
1598 |
<input
|
1599 |
type="button"
|
1600 |
+
class="wppa-admin-button"
|
1601 |
onclick="wppaTryMagick( ' . $id . ', \'auto-level\' )"
|
1602 |
value="' . esc_attr( __( 'Auto Level', 'wp-photo-album-plus' ) ) . '"
|
1603 |
title="-auto-level"
|
1604 |
+
/>' );
|
1605 |
|
1606 |
// Contrast+
|
1607 |
wppa_echo( '
|
1608 |
<input
|
1609 |
type="button"
|
1610 |
+
class="wppa-admin-button"
|
1611 |
onclick="wppaTryMagick( ' . $id . ', \'contrast-p\' )"
|
1612 |
value="' . esc_attr( __( 'Contrast+', 'wp-photo-album-plus' ) ) . '"
|
1613 |
title="-brightness-contrast 0x5"
|
1614 |
+
/>' );
|
1615 |
|
1616 |
// Contrast-
|
1617 |
wppa_echo( '
|
1618 |
<input
|
1619 |
type="button"
|
1620 |
+
class="wppa-admin-button"
|
1621 |
onclick="wppaTryMagick( ' . $id . ', \'contrast-m\' )"
|
1622 |
value="' . esc_attr( __( 'Contrast-', 'wp-photo-album-plus' ) ) . '"
|
1623 |
title="-brightness-contrast 0x-5"
|
1627 |
wppa_echo( '
|
1628 |
<input
|
1629 |
type="button"
|
1630 |
+
class="wppa-admin-button"
|
1631 |
onclick="wppaTryMagick( ' . $id . ', \'brightness-p\' )"
|
1632 |
value="' . esc_attr( __( 'Brightness+', 'wp-photo-album-plus' ) ) . '"
|
1633 |
title="-brightness-contrast 5"
|
1637 |
wppa_echo( '
|
1638 |
<input
|
1639 |
type="button"
|
1640 |
+
class="wppa-admin-button"
|
1641 |
onclick="wppaTryMagick( ' . $id . ', \'brightness-m\' )"
|
1642 |
value="' . esc_attr( __( 'Brightness-', 'wp-photo-album-plus' ) ) . '"
|
1643 |
title="-brightness-contrast -5"
|
1647 |
wppa_echo( '
|
1648 |
<input
|
1649 |
type="button"
|
1650 |
+
class="wppa-admin-button"
|
1651 |
onclick="wppaTryMagick( ' . $id . ', \'despeckle\' )"
|
1652 |
value="' . esc_attr( __( 'Despeckle', 'wp-photo-album-plus' ) ) . '"
|
1653 |
title="-despeckle"
|
1657 |
wppa_echo( '
|
1658 |
<input
|
1659 |
type="button"
|
1660 |
+
class="wppa-admin-button"
|
1661 |
onclick="wppaTryMagick( ' . $id . ', \'lineargray\' )"
|
1662 |
value="' . esc_attr( __( 'Linear gray', 'wp-photo-album-plus' ) ) . '"
|
1663 |
title="-colorspace gray"
|
1667 |
wppa_echo( '
|
1668 |
<input
|
1669 |
type="button"
|
1670 |
+
class="wppa-admin-button"
|
1671 |
onclick="wppaTryMagick( ' . $id . ', \'nonlineargray\' )"
|
1672 |
value="' . esc_attr( __( 'Non-linear gray', 'wp-photo-album-plus' ) ) . '"
|
1673 |
title="-grayscale Rec709Luma"
|
1677 |
wppa_echo( '
|
1678 |
<input
|
1679 |
type="button"
|
1680 |
+
class="wppa-admin-button"
|
1681 |
onclick="wppaTryMagick( ' . $id . ', \'charcoal\' )"
|
1682 |
value="' . esc_attr( __( 'Charcoal', 'wp-photo-album-plus' ) ) . '"
|
1683 |
title="-charcoal"
|
1687 |
wppa_echo( '
|
1688 |
<input
|
1689 |
type="button"
|
1690 |
+
class="wppa-admin-button"
|
1691 |
onclick="wppaTryMagick( ' . $id . ', \'paint\' )"
|
1692 |
value="' . esc_attr( __( 'Paint', 'wp-photo-album-plus' ) ) . '"
|
1693 |
title="-paint"
|
1697 |
wppa_echo( '
|
1698 |
<input
|
1699 |
type="button"
|
1700 |
+
class="wppa-admin-button"
|
1701 |
onclick="wppaTryMagick( ' . $id . ', \'sepia\' )"
|
1702 |
value="' . esc_attr( __( 'Sepia', 'wp-photo-album-plus' ) ) . '"
|
1703 |
title="-sepia-tone 80%"
|
1707 |
wppa_echo( '
|
1708 |
<input
|
1709 |
type="button"
|
1710 |
+
class="wppa-admin-button"
|
1711 |
onclick="wppaToggleHorizon()"
|
1712 |
value="' . esc_attr( 'Show/hide horizon', 'wp-photo-album-plus' ) . '"
|
1713 |
title="' . esc_attr( 'Toggle horizon reference line on/off', 'wp-photo-album-plus' ) . '"
|
1717 |
wppa_echo( '
|
1718 |
<input
|
1719 |
type="button"
|
1720 |
+
class="wppa-admin-button"
|
1721 |
onclick="wppaTryMagick( ' . $id . ', \'skyleft\' )"
|
1722 |
value="' . esc_attr( '0.5°', 'wp-photo-album-plus' ) . '"
|
1723 |
title="' . esc_attr( 'Rotate image by 0.5° anticlockwise', 'wp-photo-album-plus' ) . '"
|
1727 |
wppa_echo( '
|
1728 |
<input
|
1729 |
type="button"
|
1730 |
+
class="wppa-admin-button"
|
1731 |
onclick="wppaTryMagick( ' . $id . ', \'skyright\' )"
|
1732 |
value="' . esc_attr( '-0.5°', 'wp-photo-album-plus' ) . '"
|
1733 |
title="' . esc_attr( 'Rotate image by 0.5° clockwise', 'wp-photo-album-plus' ) . '"
|
1737 |
wppa_echo( '
|
1738 |
<input
|
1739 |
type="button"
|
1740 |
+
class="wppa-admin-button"
|
1741 |
id="button-' . $id . '"
|
1742 |
value="Crop"
|
1743 |
title=""
|
1766 |
'<option value="0.625"' . ( $dflt == '0.625' ? ' selected' : '' ) . '>5:8 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>' .
|
1767 |
'<option value="0.5625"' . ( $dflt == '0.5625' ? ' selected' : '' ) . '>9:16 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>' .
|
1768 |
'<option value="0.5"' . ( $dflt == '0.5' ? ' selected' : '' ) . '>1:2 ' . __( 'portrait', 'wp-photo-album-plus' ) . '</option>' .
|
1769 |
+
'</select>' . $br );
|
1770 |
|
1771 |
if ( $dflt == 'ratio' ) {
|
1772 |
$value = $ratio;
|
1795 |
sanitize_text_field( $magickstack ) .
|
1796 |
'</span>' .
|
1797 |
' ' .
|
1798 |
+
'<input
|
1799 |
+
type="button"
|
1800 |
+
class="wppa-admin-button"
|
1801 |
+
id="imstackbutton-' . strval( intval( $id ) ) . '"
|
1802 |
+
onclick="wppaTryMagick( ' . strval( intval( $id ) ) . ', \'magickundo\' )"
|
1803 |
+
value="' . esc_attr( __( 'Undo', 'wp-photo-album-plus' ) ) . '"
|
1804 |
+
title="' . esc_attr( __( 'Undo last Magick command', 'wp-photo-album-plus' ) ) . '"
|
1805 |
+
style="' . ( $magickstack ? 'display:inline;' : 'display:none;' ) . '"' .
|
1806 |
+
'/>' .
|
1807 |
'</td>' .
|
1808 |
'</tr>' );
|
1809 |
|
2099 |
'<br>' .
|
2100 |
'<span class="description">' .
|
2101 |
__( 'If you want this link to be used, check \'PS Overrule\' checkbox in table VI.' , 'wp-photo-album-plus' ) .
|
2102 |
+
'</span>' );
|
2103 |
}
|
2104 |
wppa_echo(
|
2105 |
'</td>' .
|
2218 |
'</tbody>' .
|
2219 |
'</table>' );
|
2220 |
|
2221 |
+
wppa_echo( '<!-- Section 5 -->' );
|
2222 |
|
2223 |
// IPTC
|
2224 |
if ( ! $quick ) {
|
2304 |
|
2305 |
foreach ( $exifs as $exif ) {
|
2306 |
$desc = $exif['description'];
|
2307 |
+
// if ( strlen( $desc ) < 3 ) continue;
|
2308 |
if ( is_serialized( $desc ) ) {
|
2309 |
$desc = 'Array(' . count( wppa_unserialize( $desc ) ) . ')';
|
2310 |
}
|
2324 |
}
|
2325 |
|
2326 |
wppa_echo( '
|
2327 |
+
<td style="padding:0 4px">' . wp_kses( $desc, 'post' ) . '</td>
|
2328 |
+
<td style="padding:0 4px">' . wp_kses( wppa_format_exif( $exif['tag'], $exif['description'], $brand ), 'post' ) . '</td>
|
2329 |
</tr>' );
|
2330 |
|
2331 |
}
|
2336 |
}
|
2337 |
}
|
2338 |
|
2339 |
+
wppa_echo( '<!-- Section 6 -->' );
|
2340 |
|
2341 |
// Comments
|
2342 |
if ( ! $quick ) {
|
2391 |
elseif ( $comment['status'] == 'approved' ) _e( 'Approved' , 'wp-photo-album-plus' );
|
2392 |
elseif ( $comment['status'] == 'spam' ) _e( 'Spam' , 'wp-photo-album-plus' );
|
2393 |
elseif ( $comment['status'] == 'trash' ) _e( 'Trash' , 'wp-photo-album-plus' );
|
2394 |
+
wppa_echo( '</td>' );
|
2395 |
}
|
2396 |
wppa_echo( '<td style="padding:0 4px">'.$comment['comment'].'</td>
|
2397 |
</tr>' );
|
2715 |
<option value="pending"><?php _e( 'Pending' , 'wp-photo-album-plus' ) ?></option>
|
2716 |
<option value="publish"><?php _e( 'Publish' , 'wp-photo-album-plus' ) ?></option>
|
2717 |
<?php if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) $dis = ' disabled'; else $dis = ''; ?>
|
2718 |
+
<option value="featured"<?php wppa_echo( $dis )?> ><?php _e( 'Featured' , 'wp-photo-album-plus' ) ?></option>
|
2719 |
+
<option value="gold" <?php wppa_echo( $dis )?> ><?php _e( 'Gold' , 'wp-photo-album-plus' ) ?></option>
|
2720 |
+
<option value="silver" <?php wppa_echo( $dis )?> ><?php _e( 'Silver' , 'wp-photo-album-plus' ) ?></option>
|
2721 |
+
<option value="bronze" <?php wppa_echo( $dis )?> ><?php _e( 'Bronze' , 'wp-photo-album-plus' ) ?></option>
|
2722 |
+
<option value="scheduled" <?php wppa_echo( $dis )?> ><?php _e( 'Scheduled' , 'wp-photo-album-plus' ) ?></option>
|
2723 |
+
<option value="private" <?php wppa_echo( $dis ) ?> ><?php _e( 'Private' , 'wp-photo-album-plus' ) ?></option>
|
2724 |
</select>
|
2725 |
<!-- Owner -->
|
2726 |
<?php $users = wppa_get_users();
|
2741 |
<input type="submit" onclick="return wppaBulkDoitOnClick()" class="button-primary" value="<?php _e( 'Doit!' , 'wp-photo-album-plus' ) ?>" />
|
2742 |
<?php
|
2743 |
if ( wppa_is_mobile() ) {
|
2744 |
+
wppa_echo( '<br>' );
|
2745 |
}
|
2746 |
?>
|
2747 |
<?php $nextafterselhtml =
|
2752 |
'</select>';
|
2753 |
wppa_echo( sprintf( __( 'Go to %s after Doit!.', 'wp-photo-album-plus' ), $nextafterselhtml ) );
|
2754 |
if ( wppa_is_mobile() ) {
|
2755 |
+
wppa_echo( '<br>' );
|
2756 |
}
|
2757 |
?>
|
2758 |
|
2774 |
/>
|
2775 |
<?php _e('Confirm move', 'wp-photo-album-plus' ) ?>
|
2776 |
|
2777 |
+
<?php wppa_echo( '<small style="float:right"> (' . count( $photos ) . ')</small>' );
|
2778 |
|
2779 |
?>
|
2780 |
</h3>
|
2814 |
}
|
2815 |
|
2816 |
$maxsize = wppa_get_minisize(); ?>
|
2817 |
+
<tr id="photoitem-<?php wppa_echo( $photo['id'] ) ?>">
|
2818 |
<!-- Checkbox -->
|
2819 |
<td>
|
2820 |
+
<input type="hidden" id="photo-nonce-<?php wppa_echo( $photo['id'] ) ?>" value="<?php wppa_echo( wp_create_nonce( 'wppa-nonce_'.$photo['id'] ) ) ?>" />
|
2821 |
+
<input type="checkbox" name="wppa-bulk-photo[<?php wppa_echo( $photo['id'] ) ?>]" class="wppa-bulk-photo" />
|
2822 |
</td>
|
2823 |
<!-- ID and delete link -->
|
2824 |
<td><?php
|
2877 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
2878 |
' style="max-width:' . $maxsize . 'px;max-height:' . $maxsize . 'px"' .
|
2879 |
' />' .
|
2880 |
+
'</a>' );
|
2881 |
}
|
2882 |
?>
|
2883 |
</td>
|
2884 |
<!-- Name, size, move -->
|
2885 |
<!-- Name -->
|
2886 |
<td style="width:25%">
|
2887 |
+
<input type="text" style="width:300px" id="pname-<?php wppa_echo( $photo['id'] ) ?>" onchange="wppaAjaxUpdatePhoto( <?php wppa_echo( $photo['id'] ) ?>, 'name', this.value)" value="<?php wppa_echo( esc_attr( stripslashes( $photo['name'] ) ) ) ?>" />
|
2888 |
<!-- Size -->
|
2889 |
<?php
|
2890 |
if ( wppa_is_video( $photo['id'] ) ) {
|
2891 |
+
wppa_echo( '<br>'.strval(intval(wppa_get_videox( $photo['id'] ))).' x '.strval(intval(wppa_get_videoy( $photo['id'] ))).' px.' );
|
2892 |
}
|
2893 |
else {
|
2894 |
$sp = wppa_get_source_path( $photo['id'] );
|
2895 |
if ( is_file( $sp ) ) {
|
2896 |
$ima = getimagesize( $sp );
|
2897 |
if ( is_array( $ima ) ) {
|
2898 |
+
wppa_echo( '<br>'.$ima['0'].' x '.$ima['1'].' px.' );
|
2899 |
}
|
2900 |
}
|
2901 |
}
|
2933 |
</td>
|
2934 |
<!-- Description -->
|
2935 |
<td style="width:25%">
|
2936 |
+
<textarea class="wppa-bulk-dec" style="height:50px; width:100%" onchange="wppaAjaxUpdatePhoto( <?php wppa_echo( $photo['id'] ) ?>, 'description', this.value)"><?php wppa_echo( ( esc_textarea( stripslashes( $photo['description'] ) ) ) ) ?></textarea>
|
2937 |
</td>
|
2938 |
<!-- Status -->
|
2939 |
<td>
|
2940 |
<?php if ( current_user_can( 'wppa_admin' ) || current_user_can( 'wppa_moderate' ) ) { ?>
|
2941 |
+
<select id="status-<?php wppa_echo( $photo['id'] ) ?>" onchange="wppaAjaxUpdatePhoto( <?php wppa_echo( $photo['id'] ) ?>, 'status', this.value); wppaPhotoStatusChange( <?php wppa_echo( $photo['id'] ) ?> ); ">
|
2942 |
+
<option value="pending" <?php if ( $photo['status']=='pending' ) wppa_echo( 'selected' )?> ><?php _e( 'Pending' , 'wp-photo-album-plus' ) ?></option>
|
2943 |
+
<option value="publish" <?php if ( $photo['status']=='publish' ) wppa_echo( 'selected' )?> ><?php _e( 'Publish' , 'wp-photo-album-plus' ) ?></option>
|
2944 |
<?php if ( wppa_switch( 'ext_status_restricted' ) && ! wppa_user_is( 'administrator' ) ) $dis = ' disabled'; else $dis = ''; ?>
|
2945 |
+
<option value="featured" <?php if ( $photo['status']=='featured' ) wppa_echo( 'selected' ); wppa_echo( $dis )?> ><?php _e( 'Featured' , 'wp-photo-album-plus' ) ?></option>
|
2946 |
+
<option value="gold" <?php if ( $photo['status'] == 'gold' ) wppa_echo( 'selected' ); wppa_echo( $dis )?> ><?php _e( 'Gold' , 'wp-photo-album-plus' ) ?></option>
|
2947 |
+
<option value="silver" <?php if ( $photo['status'] == 'silver' ) wppa_echo( 'selected' ); wppa_echo( $dis )?> ><?php _e( 'Silver' , 'wp-photo-album-plus' ) ?></option>
|
2948 |
+
<option value="bronze" <?php if ( $photo['status'] == 'bronze' ) wppa_echo( 'selected' ); wppa_echo( $dis )?> ><?php _e( 'Bronze' , 'wp-photo-album-plus' ) ?></option>
|
2949 |
+
<option value="scheduled" <?php if ( $photo['status'] == 'scheduled' ) wppa_echo( 'selected' ); wppa_echo( $dis )?> ><?php _e( 'Scheduled' , 'wp-photo-album-plus' ) ?></option>
|
2950 |
+
<option value="private" <?php if ( $photo['status'] == 'private' ) wppa_echo( 'selected' ); wppa_echo( $dis )?> ><?php _e( 'Private' , 'wp-photo-album-plus' ) ?></option>
|
2951 |
</select>
|
2952 |
<?php }
|
2953 |
else {
|
2963 |
</td>
|
2964 |
<!-- Owner -->
|
2965 |
<td>
|
2966 |
+
<?php wppa_echo( $photo['owner'] ) ?>
|
2967 |
</td>
|
2968 |
<!-- Remark -->
|
2969 |
+
<td id="remark-<?php wppa_echo( $photo['id'] ) ?>" style="width:25%">
|
2970 |
<?php _e( 'Not modified' , 'wp-photo-album-plus' ) ?>
|
2971 |
<?php wppa_add_inline_script( 'wppa-admin', 'wppaPhotoStatusChange('.$photo['id'].');' ); ?>
|
2972 |
</td>
|
3125 |
$mt = ( $mh - ( $imgs[1]/$imgs[0] * $mw ) ) / '2' + '15';
|
3126 |
}
|
3127 |
?>
|
3128 |
+
<li id="photoitem-<?php wppa_echo( $photo['id'] ) ?>" class="ui-state-default-photos wppa-<?php wppa_echo( $photo['status'] ) ?>" style="background-image:none; text-align:center; cursor:move">
|
3129 |
<?php if ( wppa_is_video( $photo['id'] ) ) { ?>
|
3130 |
<?php $id = $photo['id'] ?>
|
3131 |
<?php $imgstyle = 'max-width:'.$mw.'px;max-height:'.$mh.'px;margin-top:'.$mt.'px;' ?>
|
3155 |
'<img' .
|
3156 |
' class="wppa-bulk-thumb"' .
|
3157 |
' ' . ( wppa_lazy() ? 'data-' : '' ) . 'src="' . esc_url( wppa_get_thumb_url( $photo['id'] ) ) . '"' .
|
3158 |
+
' style="max-width:' . $mw . 'px;max-height:' . $mh . 'px;margin-top:' . $mt . 'px" />' );
|
3159 |
} ?>
|
3160 |
+
<div style="font-size:9px; position:absolute; bottom:24px; text-align:center; width:<?php wppa_echo( $size ) ?>px"><?php wppa_echo( wppa_get_photo_name( $photo['id'] ) ) ?></div>
|
3161 |
+
<div style="text-align: center; width: <?php wppa_echo( $size ) ?>px; position:absolute; bottom:8px">
|
3162 |
+
<span style="margin-left:15px;float:left"><?php wppa_echo( __( 'Id: ' , 'wp-photo-album-plus' ).$photo['id'] )?></span>
|
3163 |
<?php if ( wppa_is_video( $photo['id'] ) )_e('Video', 'wp-photo-album-plus' ); ?>
|
3164 |
<?php if ( wppa_has_audio( $photo['id'] ) ) _e('Audio', 'wp-photo-album-plus' ); ?>
|
3165 |
+
<span style="float:right; margin-right:15px"><?php wppa_echo( __( 'Ord: ' , 'wp-photo-album-plus' ).'<span id="wppa-seqno-'.$photo['id'].'">'.$photo['p_order'] ) ?></span>
|
3166 |
</div>
|
3167 |
+
<input type="hidden" id="photo-nonce-<?php wppa_echo( $photo['id'] ) ?>" value="<?php wppa_echo( wp_create_nonce( 'wppa-nonce_'.$photo['id'] ) ); ?>" />
|
3168 |
+
<input type="hidden" class="wppa-sort-item" value="<?php wppa_echo( $photo['id'] ) ?>" />
|
3169 |
+
<input type="hidden" class="wppa-sort-seqn" id="wppa-sort-seqn-<?php wppa_echo( $photo['id'] ) ?>" value="<?php wppa_echo( $photo['p_order'] ) ?>" />
|
3170 |
</li>
|
3171 |
<?php } ?>
|
3172 |
</ul>
|
3175 |
<?php
|
3176 |
}
|
3177 |
else {
|
3178 |
+
wppa_echo( '<h3>'.__( 'The album is empty.' , 'wp-photo-album-plus' ).'</h3>' );
|
3179 |
}
|
3180 |
}
|
3181 |
else {
|
3421 |
wppa_get_imgalt( $photo ) .
|
3422 |
' />' .
|
3423 |
' ' .
|
3424 |
+
wppa_opt( 'fe_edit_caption' ) . '</h3>' );
|
3425 |
|
3426 |
// Open form
|
3427 |
wppa_echo(
|
3446 |
// Items
|
3447 |
foreach ( array_keys( $items ) as $idx ) {
|
3448 |
if ( $titles[$idx] && $doit[$idx] ) {
|
3449 |
+
wppa_echo( '<h6>' . $titles[$idx] . '</h6>' );
|
3450 |
|
3451 |
if ( wppa_is_int( substr( $items[$idx], -1 ) ) ) {
|
3452 |
$value = stripslashes( $custom_data[substr( $items[$idx], -1 )] );
|
3499 |
' />' );
|
3500 |
|
3501 |
// Close form
|
3502 |
+
wppa_echo( '</form>' );
|
3503 |
|
3504 |
// Close page
|
3505 |
+
wppa_echo( '</div>' );
|
3506 |
|
3507 |
}
|
3508 |
|
wppa-potd-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the photo of the day widget
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -222,7 +222,7 @@ class PhotoOfTheDay extends WP_Widget {
|
|
222 |
if ( $image ) {
|
223 |
wppa_echo( $result );
|
224 |
}
|
225 |
-
|
226 |
|
227 |
wppa( 'in_widget', false );
|
228 |
}
|
@@ -248,27 +248,29 @@ class PhotoOfTheDay extends WP_Widget {
|
|
248 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
249 |
|
250 |
// Title
|
251 |
-
|
252 |
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
253 |
|
254 |
// Loggedin only
|
255 |
-
|
256 |
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
257 |
|
258 |
// Explanation
|
259 |
if ( current_user_can( 'wppa_settings' ) ) {
|
260 |
-
|
261 |
'<p>' .
|
262 |
__( 'You can set the content and the sizes in this widget in the <b>Photo Albums -> Photo of the day</b> admin page.', 'wp-photo-album-plus' ) .
|
263 |
-
wppa_see_also( 'photos', 3 ) .
|
264 |
-
'</p>'
|
265 |
}
|
|
|
|
|
266 |
}
|
267 |
|
268 |
// Set defaults
|
269 |
function get_defaults() {
|
270 |
|
271 |
-
$defaults = array( 'title' => __('Photo of the day', 'wp-photo-album-plus' ),
|
272 |
'logonly' => 'no',
|
273 |
);
|
274 |
return $defaults;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display the photo of the day widget
|
6 |
+
* Version 8.1.10.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
222 |
if ( $image ) {
|
223 |
wppa_echo( $result );
|
224 |
}
|
225 |
+
wppa_echo( wppa_widget_timer( 'show', $widget_title ) );
|
226 |
|
227 |
wppa( 'in_widget', false );
|
228 |
}
|
248 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
249 |
|
250 |
// Title
|
251 |
+
$result =
|
252 |
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
253 |
|
254 |
// Loggedin only
|
255 |
+
$result .=
|
256 |
wppa_widget_checkbox( $this, 'logonly', $instance['logonly'], __( 'Show to logged in visitors only', 'wp-photo-album-plus' ) );
|
257 |
|
258 |
// Explanation
|
259 |
if ( current_user_can( 'wppa_settings' ) ) {
|
260 |
+
$result .=
|
261 |
'<p>' .
|
262 |
__( 'You can set the content and the sizes in this widget in the <b>Photo Albums -> Photo of the day</b> admin page.', 'wp-photo-album-plus' ) .
|
263 |
+
wppa_see_also( 'photos', 3 ); // .
|
264 |
+
'</p>';
|
265 |
}
|
266 |
+
|
267 |
+
wppa_echo( $result );
|
268 |
}
|
269 |
|
270 |
// Set defaults
|
271 |
function get_defaults() {
|
272 |
|
273 |
+
$defaults = array( 'title' => __( 'Photo of the day', 'wp-photo-album-plus' ),
|
274 |
'logonly' => 'no',
|
275 |
);
|
276 |
return $defaults;
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -380,14 +380,11 @@ global $wppa_subtab_names;
|
|
380 |
}
|
381 |
|
382 |
// Check for 'many' albums
|
383 |
-
if (
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
__( 'If you do not have pageload performance problems, you may increase the number number configured.', 'wp-photo-album-plus' ) . '<br>' .
|
389 |
-
__( 'If there are many empty albums, you can simply remove them by running the appropriate maintenance routine.', 'wp-photo-album-plus' ) . wppa_see_also( 'maintenance', '2', '9' ) );
|
390 |
-
}
|
391 |
}
|
392 |
|
393 |
// Check for availability of hires urls in case panorama is on
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
380 |
}
|
381 |
|
382 |
// Check for 'many' albums
|
383 |
+
if ( wppa_has_many_albums() ) {
|
384 |
+
wppa_warning_message( __( 'This system contains more albums than the maximum configured.', 'wp-photo-album-plus' ) . wppa_see_also( 'admin', '6', '6' ) . '<br>' .
|
385 |
+
__( 'No problem, but some widgets may not work and some album selectionboxes will revert to a simple input field asking for an album id.', 'wp-photo-album-plus' ) . ' ' .
|
386 |
+
__( 'If you do not have pageload performance problems, you may increase the number number configured.', 'wp-photo-album-plus' ) . '<br>' .
|
387 |
+
__( 'If there are many empty albums, you can simply remove them by running the appropriate maintenance routine.', 'wp-photo-album-plus' ) . wppa_see_also( 'maintenance', '2', '9' ) );
|
|
|
|
|
|
|
388 |
}
|
389 |
|
390 |
// Check for availability of hires urls in case panorama is on
|
wppa-slideshow-widget.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a slideshow in the sidebar
|
6 |
-
* Version 8.1.
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
@@ -177,6 +177,7 @@ class SlideshowWidget extends WP_Widget {
|
|
177 |
|
178 |
/** @see WP_Widget::form */
|
179 |
function form( $instance ) {
|
|
|
180 |
|
181 |
// Defaults
|
182 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
@@ -186,16 +187,22 @@ class SlideshowWidget extends WP_Widget {
|
|
186 |
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
187 |
|
188 |
// Album
|
189 |
-
$
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
|
|
196 |
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
// Including sub albums?
|
201 |
echo
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* display a slideshow in the sidebar
|
6 |
+
* Version 8.1.10.001
|
7 |
*/
|
8 |
|
9 |
if ( ! defined( 'ABSPATH' ) ) die( "Can't load this file directly" );
|
177 |
|
178 |
/** @see WP_Widget::form */
|
179 |
function form( $instance ) {
|
180 |
+
global $wpdb;
|
181 |
|
182 |
// Defaults
|
183 |
$instance = wppa_parse_args( (array) $instance, $this->get_defaults() );
|
187 |
wppa_widget_input( $this, 'title', $instance['title'], __( 'Title', 'wp-photo-album-plus' ) );
|
188 |
|
189 |
// Album
|
190 |
+
if ( wppa_opt( 'photo_admin_max_albums' ) >= $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_albums" ) ) {
|
191 |
+
$body =
|
192 |
+
'<option value="-2"' . ( $instance['album'] == '-2' ? ' selected' : '' ) . ' >' . __( '--- all ---', 'wp-photo-album-plus' ) . '</option>' .
|
193 |
+
wppa_album_select_a( array (
|
194 |
+
'selected' => $instance['album'],
|
195 |
+
'path' => true,
|
196 |
+
'sort' => true,
|
197 |
+
) );
|
198 |
|
199 |
+
echo
|
200 |
+
wppa_widget_selection_frame( $this, 'album', $body, __( 'Album', 'wp-photo-album-plus' ) );
|
201 |
+
}
|
202 |
+
else {
|
203 |
+
echo
|
204 |
+
wppa_widget_input( $this, 'album', $instance['album'], __( 'Album', 'wp-photo-album-plus' ) );
|
205 |
+
}
|
206 |
|
207 |
// Including sub albums?
|
208 |
echo
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 8.1.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2187,6 +2187,7 @@ function wppa_get_source_pl( $id ) {
|
|
2187 |
wppa_get_album_name_for_pl( wppa_get_photo_item( $id, 'album' ) ) .
|
2188 |
'/' . basename( $source_path ); // My-Photo.jpg
|
2189 |
}
|
|
|
2190 |
}
|
2191 |
|
2192 |
return $result;
|
@@ -3251,6 +3252,15 @@ function wppa_is_iphoneoripad() {
|
|
3251 |
return $result;
|
3252 |
}
|
3253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3254 |
function wppa_is_chrome() {
|
3255 |
return ( get_browser_name() == 'Chrome' );
|
3256 |
}
|
@@ -4996,16 +5006,51 @@ global $wppa_defaults;
|
|
4996 |
// Compress html
|
4997 |
function wppa_compress_html( $txt, $keeplinebreaks = false ) {
|
4998 |
|
4999 |
-
//
|
5000 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5001 |
$result = str_replace( ["\r\n", "\n"], [" ", " "], $txt );
|
5002 |
}
|
5003 |
-
|
5004 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5005 |
}
|
5006 |
|
5007 |
-
|
5008 |
-
$
|
|
|
5009 |
|
5010 |
$result = str_replace( $from, $to, $result );
|
5011 |
return $result;
|
@@ -5121,7 +5166,7 @@ function wppa_utf8( $string ) {
|
|
5121 |
|
5122 |
// Use thumbnail popup?
|
5123 |
function wppa_use_thumb_popup() {
|
5124 |
-
|
5125 |
switch ( wppa_opt( 'thumb_popup' ) ) {
|
5126 |
case 'all':
|
5127 |
return true;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 8.1.10.001
|
7 |
*
|
8 |
*/
|
9 |
|
2187 |
wppa_get_album_name_for_pl( wppa_get_photo_item( $id, 'album' ) ) .
|
2188 |
'/' . basename( $source_path ); // My-Photo.jpg
|
2189 |
}
|
2190 |
+
$result = str_replace( ' ', '%20', $result );
|
2191 |
}
|
2192 |
|
2193 |
return $result;
|
3252 |
return $result;
|
3253 |
}
|
3254 |
|
3255 |
+
function wppa_is_phone() {
|
3256 |
+
|
3257 |
+
$result = false;
|
3258 |
+
if ( wppa_is_mobile() && ! wppa_is_ipad() ) {
|
3259 |
+
$result = true;
|
3260 |
+
}
|
3261 |
+
return $result;
|
3262 |
+
}
|
3263 |
+
|
3264 |
function wppa_is_chrome() {
|
3265 |
return ( get_browser_name() == 'Chrome' );
|
3266 |
}
|
5006 |
// Compress html
|
5007 |
function wppa_compress_html( $txt, $keeplinebreaks = false ) {
|
5008 |
|
5009 |
+
// If keeplinebreaks, keep them only inside a <textarea> tag.
|
5010 |
+
if ( $keeplinebreaks ) { // yes
|
5011 |
+
|
5012 |
+
// Split into chunks that ster with <textarea
|
5013 |
+
$arr = explode( '<textarea', $txt );
|
5014 |
+
|
5015 |
+
// Examine all chunks
|
5016 |
+
foreach( array_keys( $arr ) as $key ) {
|
5017 |
+
|
5018 |
+
// Does this chunk contain textarea content?
|
5019 |
+
if ( strpos( $arr[$key], '</textarea>' ) === false ) { // no
|
5020 |
+
$arr[$key] = str_replace( ["\r\n", "\n"], [" ", " "], $arr[$key] );
|
5021 |
+
}
|
5022 |
+
else { // yes. only remove linebreaks in the part after </textarea>
|
5023 |
+
$arr2 = explode( '</textarea>', $arr[$key] );
|
5024 |
+
$arr2[1] = str_replace( ["\r\n", "\n"], [" ", " "], $arr2[1] );
|
5025 |
+
|
5026 |
+
// Recombide chunk parts
|
5027 |
+
$arr[$key] = implode( '</textarea>', $arr2 );
|
5028 |
+
}
|
5029 |
+
}
|
5030 |
+
|
5031 |
+
// Recombine chunks
|
5032 |
+
$result = implode( '<textarea', $arr );
|
5033 |
+
}
|
5034 |
+
else { // no. do not keep linebreaks
|
5035 |
$result = str_replace( ["\r\n", "\n"], [" ", " "], $txt );
|
5036 |
}
|
5037 |
+
|
5038 |
+
// Change tabs into spaces
|
5039 |
+
$result = str_replace( "\t", " ", $result );
|
5040 |
+
|
5041 |
+
// Change multiple spaces into one
|
5042 |
+
$L0 = strlen( $result );
|
5043 |
+
$result = str_replace( " ", " ", $result );
|
5044 |
+
$L1 = strlen( $result );
|
5045 |
+
while ( $L0 != $L1 ) {
|
5046 |
+
$L0 = $L1;
|
5047 |
+
$result = str_replace( " ", " ", $result );
|
5048 |
+
$L1 = strlen( $result );
|
5049 |
}
|
5050 |
|
5051 |
+
// Now do the other comprssions
|
5052 |
+
$from = array( "> <", "<ul></ul>", "<!--", '" >', '; ', '&', 'style=" ', '"/>', ' style=""', 'px;;' );
|
5053 |
+
$to = array( "><", "", "\n<!--", '">', ';', '&', 'style="', '" />', '', 'px;' );
|
5054 |
|
5055 |
$result = str_replace( $from, $to, $result );
|
5056 |
return $result;
|
5166 |
|
5167 |
// Use thumbnail popup?
|
5168 |
function wppa_use_thumb_popup() {
|
5169 |
+
|
5170 |
switch ( wppa_opt( 'thumb_popup' ) ) {
|
5171 |
case 'all':
|
5172 |
return true;
|
wppa-widget-functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-widget-functions.php
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
-
/* Version 8.1.
|
6 |
/*
|
7 |
*/
|
8 |
|
@@ -483,7 +483,7 @@ function wppa_widget_selection( $class, $item, $value, $label, $options, $values
|
|
483 |
' value="' . $values[$key] . '"' .
|
484 |
( $value == $values[$key] ? ' selected' : '' ) .
|
485 |
( isset( $disabled[$key] ) && $disabled[$key] ? ' disabled' : '' ) .
|
486 |
-
'
|
487 |
__( $options[$key] ) .
|
488 |
'</option>';
|
489 |
}
|
2 |
/* wppa-widget-functions.php
|
3 |
/* Package: wp-photo-album-plus
|
4 |
/*
|
5 |
+
/* Version 8.1.10.001
|
6 |
/*
|
7 |
*/
|
8 |
|
483 |
' value="' . $values[$key] . '"' .
|
484 |
( $value == $values[$key] ? ' selected' : '' ) .
|
485 |
( isset( $disabled[$key] ) && $disabled[$key] ? ' disabled' : '' ) .
|
486 |
+
'>' .
|
487 |
__( $options[$key] ) .
|
488 |
'</option>';
|
489 |
}
|
wppa-wrappers.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
-
* Version 8.1.
|
9 |
*
|
10 |
*/
|
11 |
|
@@ -780,6 +780,7 @@ static $allowed_tags;
|
|
780 |
'h4' => $sa,
|
781 |
'h5' => $sa,
|
782 |
'h6' => $sa,
|
|
|
783 |
'i' => $sa,
|
784 |
'img' => array_merge( $sa, array(
|
785 |
'alt' => true,
|
@@ -804,6 +805,7 @@ static $allowed_tags;
|
|
804 |
'label' => array(
|
805 |
'for' => true,
|
806 |
'class' => true,
|
|
|
807 |
),
|
808 |
'link' => array(
|
809 |
'rel' => true,
|
@@ -938,7 +940,7 @@ static $allowed_tags;
|
|
938 |
$html = $temp['html'];
|
939 |
$js = $temp['js'];
|
940 |
|
941 |
-
/* Start debugging
|
942 |
$before = $html;
|
943 |
$before = str_replace( ['" >',';"','; ', '&', 'style=" ', '"/>', ' style=""', ';;'], ['">','"',';', '&', 'style="', '" />', '', ';'], $before );
|
944 |
$after = wp_kses( $before, $t, $p );
|
@@ -949,8 +951,8 @@ static $allowed_tags;
|
|
949 |
|
950 |
foreach( array_keys( $before_a ) as $key ) {
|
951 |
|
952 |
-
$bef = $before_a[$key];
|
953 |
-
$aft = isset( $after_a[$key] ) ? $after_a[$key] : '';
|
954 |
|
955 |
if ( $bef != $aft ) {
|
956 |
|
5 |
* Contains wrappers for standard php functions
|
6 |
* For security and bug reasons
|
7 |
*
|
8 |
+
* Version 8.1.10.001
|
9 |
*
|
10 |
*/
|
11 |
|
780 |
'h4' => $sa,
|
781 |
'h5' => $sa,
|
782 |
'h6' => $sa,
|
783 |
+
'hr' => array(),
|
784 |
'i' => $sa,
|
785 |
'img' => array_merge( $sa, array(
|
786 |
'alt' => true,
|
805 |
'label' => array(
|
806 |
'for' => true,
|
807 |
'class' => true,
|
808 |
+
'style' => true,
|
809 |
),
|
810 |
'link' => array(
|
811 |
'rel' => true,
|
940 |
$html = $temp['html'];
|
941 |
$js = $temp['js'];
|
942 |
|
943 |
+
/* Start debugging */
|
944 |
$before = $html;
|
945 |
$before = str_replace( ['" >',';"','; ', '&', 'style=" ', '"/>', ' style=""', ';;'], ['">','"',';', '&', 'style="', '" />', '', ';'], $before );
|
946 |
$after = wp_kses( $before, $t, $p );
|
951 |
|
952 |
foreach( array_keys( $before_a ) as $key ) {
|
953 |
|
954 |
+
$bef = rtrim( $before_a[$key] );
|
955 |
+
$aft = isset( $after_a[$key] ) ? rtrim( $after_a[$key] ) : '';
|
956 |
|
957 |
if ( $bef != $aft ) {
|
958 |
|
wppa.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
-
* Version: 8.1.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -24,7 +24,7 @@ global $wp_version;
|
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
-
$wppa_api_version = '8.1.
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 8.1.10.001
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
global $wppa_api_version;
|
27 |
+
$wppa_api_version = '8.1.10.001'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|