Version Description
= 7.4.02 =
- This version addresses various bug fixes and feature requests.
Download this release
Release Info
Developer | opajaap |
Plugin | WP Photo Album Plus |
Version | 7.4.02.002 |
Comparing to | |
See all releases |
Code changes from version 7.4.01.005 to 7.4.02.002
- changelog.txt +7 -1
- readme.txt +3 -3
- wppa-ajax.php +3 -5
- wppa-exif-iptc-common.php +31 -29
- wppa-filter.php +19 -2
- wppa-functions.php +8 -8
- wppa-items.php +13 -14
- wppa-photo-admin-autosave.php +3 -5
- wppa-settings-autosave.php +6 -2
- wppa-utils.php +4 -3
- wppa.php +3 -3
changelog.txt
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
= 7.4.01 =
|
4 |
|
5 |
* New setting Table IV-A35.1: Request info dialog text. Requesting info now opens a dialog box that asks the user to specify his request.
|
@@ -11,7 +17,7 @@ The wppa shortcode is only processed when the user is logged in or the user is a
|
|
11 |
This means that a shortcode with the delay attribute inside a [wppa_set] wrapper now also obeys the runtme modifyable settings.
|
12 |
* Shortcode types that result in unexpected display when attribute delay is used
|
13 |
now produce a log debug message and will ignore the delay attribute rather than a generic album display.
|
14 |
-
* Table VI-C1 (download link) has a new option: new.
|
15 |
Creates a download button for loggedin visitors only, on the same row as the edit/delete/request info/My choice buttons. Photos only.
|
16 |
* There are now distinguished cachefiles for logged-in and logged-out visitor displays.
|
17 |
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 7.4.02 =
|
4 |
+
|
5 |
+
* Missing IPTC or EXIF data will no longer be displayed as N.a., but will show empty.
|
6 |
+
* The parent shortcode attribute will now also work for virtual albums. E.g. [wppa type="content" parent="#featen,1,5"].
|
7 |
+
* Shortcode type="url" did no longer work due to concatenated html comment. Fixed.
|
8 |
+
|
9 |
= 7.4.01 =
|
10 |
|
11 |
* New setting Table IV-A35.1: Request info dialog text. Requesting info now opens a dialog box that asks the user to specify his request.
|
17 |
This means that a shortcode with the delay attribute inside a [wppa_set] wrapper now also obeys the runtme modifyable settings.
|
18 |
* Shortcode types that result in unexpected display when attribute delay is used
|
19 |
now produce a log debug message and will ignore the delay attribute rather than a generic album display.
|
20 |
+
* Table VI-C1 (download link) has a new option: new.
|
21 |
Creates a download button for loggedin visitors only, on the same row as the edit/delete/request info/My choice buttons. Photos only.
|
22 |
* There are now distinguished cachefiles for logged-in and logged-out visitor displays.
|
23 |
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
-
Version: 7.4.
|
6 |
-
Stable tag: 7.4.
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
@@ -137,7 +137,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
|
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
140 |
-
= 7.4.
|
141 |
|
142 |
* This version addresses various bug fixes and feature requests.
|
143 |
|
2 |
Contributors: opajaap
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=OpaJaap@OpaJaap.nl&item_name=WP-Photo-Album-Plus&item_number=Support-Open-Source¤cy_code=USD&lc=US
|
4 |
Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
|
5 |
+
Version: 7.4.02.002
|
6 |
+
Stable tag: 7.4.01.005
|
7 |
Author: J.N. Breetvelt
|
8 |
Author URI: http://www.opajaap.nl/
|
9 |
Requires at least: 3.9
|
137 |
|
138 |
== Upgrade Notice ==
|
139 |
|
140 |
+
= 7.4.02 =
|
141 |
|
142 |
* This version addresses various bug fixes and feature requests.
|
143 |
|
wppa-ajax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
-
* Version 7.4.
|
6 |
*
|
7 |
*/
|
8 |
|
@@ -262,18 +262,16 @@ global $wppa_opt;
|
|
262 |
WHERE photo > 0
|
263 |
AND tag = %s
|
264 |
AND brand = %s
|
265 |
-
AND f_description <> %s
|
266 |
AND f_description <> ''
|
267 |
-
ORDER BY f_description", $tag, $brand
|
268 |
}
|
269 |
else {
|
270 |
$exifdata = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT f_description
|
271 |
FROM $wpdb->wppa_exif
|
272 |
WHERE photo > 0
|
273 |
AND tag = %s
|
274 |
-
AND f_description <> %s
|
275 |
AND f_description <> ''
|
276 |
-
ORDER BY f_description", $tag
|
277 |
}
|
278 |
|
279 |
// Make the data sortable.
|
2 |
/* wppa-ajax.php
|
3 |
*
|
4 |
* Functions used in ajax requests
|
5 |
+
* Version 7.4.02
|
6 |
*
|
7 |
*/
|
8 |
|
262 |
WHERE photo > 0
|
263 |
AND tag = %s
|
264 |
AND brand = %s
|
|
|
265 |
AND f_description <> ''
|
266 |
+
ORDER BY f_description", $tag, $brand ), ARRAY_A );
|
267 |
}
|
268 |
else {
|
269 |
$exifdata = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT f_description
|
270 |
FROM $wpdb->wppa_exif
|
271 |
WHERE photo > 0
|
272 |
AND tag = %s
|
|
|
273 |
AND f_description <> ''
|
274 |
+
ORDER BY f_description", $tag ), ARRAY_A );
|
275 |
}
|
276 |
|
277 |
// Make the data sortable.
|
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 7.4.
|
7 |
*
|
8 |
*
|
9 |
*/
|
@@ -52,6 +52,15 @@ global $wppa_iptc_cache;
|
|
52 |
if ( ! empty( $iptcdata ) ) {
|
53 |
foreach ( $iptcdata as $iptcline ) {
|
54 |
$tag = $iptcline['tag'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
if ( $prevtag == $tag ) { // add a next item for this tag
|
56 |
$combined .= ', '.htmlspecialchars( strip_tags( $iptcline['description'] ) );
|
57 |
}
|
@@ -90,7 +99,7 @@ global $wppa_iptc_cache;
|
|
90 |
// Remove untranslated
|
91 |
$pos = strpos($temp, '2#');
|
92 |
while ( $pos !== false ) {
|
93 |
-
$tmp = substr($temp, 0, $pos)
|
94 |
$temp = $tmp;
|
95 |
$pos = strpos($temp, '2#');
|
96 |
}
|
@@ -178,9 +187,7 @@ global $wppa_exif_cache;
|
|
178 |
foreach( $groups as $group ) {
|
179 |
$pos = strpos( $temp, $group );
|
180 |
while ( $pos !== false ) {
|
181 |
-
$tmp = substr( $temp, 0, $pos ) .
|
182 |
-
( $hide_empty ? '' : '<span title="' . esc_attr( __( 'No data', 'wp-photo-album-plus' ) ) . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>' ) .
|
183 |
-
substr( $temp, $pos+6 );
|
184 |
$temp = $tmp;
|
185 |
$pos = strpos( $temp, $group );
|
186 |
}
|
@@ -787,7 +794,7 @@ global $wppa_exif_error_output;
|
|
787 |
switch( $brand ) {
|
788 |
case 'SAMSUNG':
|
789 |
switch( $data ) {
|
790 |
-
case '0 0': $result =
|
791 |
case 0: $result = __( 'Red', 'wp-photo-album-plus' ); break;
|
792 |
case 1: $result = __( 'Yellow', 'wp-photo-album-plus' ); break;
|
793 |
case 2: $result = __( 'Green', 'wp-photo-album-plus' ); break;
|
@@ -1577,7 +1584,7 @@ global $wppa_exif_error_output;
|
|
1577 |
|
1578 |
// Bogus data?
|
1579 |
if ( $x / $y > 100 || ( round( 10 * $x / $y ) / 10 ) == 0 ) {
|
1580 |
-
$result = '
|
1581 |
return $result;
|
1582 |
}
|
1583 |
|
@@ -1690,8 +1697,7 @@ global $wppa_exif_error_output;
|
|
1690 |
case '7': $result = __('Portrait', 'wp-photo-album-plus'); break;
|
1691 |
case '8': $result = __('Landscape', 'wp-photo-album-plus'); break;
|
1692 |
case '9': $result = __('Bulb', 'wp-photo-album-plus'); break;
|
1693 |
-
default:
|
1694 |
-
$result = '<span title="' . esc_attr( __( 'Unknown', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
|
1695 |
}
|
1696 |
return $result;
|
1697 |
break;
|
@@ -1709,8 +1715,7 @@ global $wppa_exif_error_output;
|
|
1709 |
case '5': $result = __('Standard Output Sensitivity and ISO Speed', 'wp-photo-album-plus'); break;
|
1710 |
case '6': $result = __('Recommended Exposure Index and ISO Speed', 'wp-photo-album-plus'); break;
|
1711 |
case '7': $result = __('Standard Output Sensitivity, Recommended Exposure Index and ISO Speed', 'wp-photo-album-plus'); break;
|
1712 |
-
default:
|
1713 |
-
$result = '<span title="' . esc_attr( __( 'Unknown', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
|
1714 |
}
|
1715 |
return $result;
|
1716 |
break;
|
@@ -1727,8 +1732,7 @@ global $wppa_exif_error_output;
|
|
1727 |
case '4': $result = 'R'; break;
|
1728 |
case '5': $result = 'G'; break;
|
1729 |
case '6': $result = 'B'; break;
|
1730 |
-
default:
|
1731 |
-
$result = '<span title="' . esc_attr( __( 'Unknown', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
|
1732 |
}
|
1733 |
return $result;
|
1734 |
break;
|
@@ -1822,7 +1826,7 @@ global $wppa_exif_error_output;
|
|
1822 |
$y = $temp[1];
|
1823 |
|
1824 |
if ( $x == 0 || $y == 0 || $x/$y > 1000 ) {
|
1825 |
-
$result = '
|
1826 |
}
|
1827 |
else {
|
1828 |
if ( $temp[1] != 0 ) {
|
@@ -1850,8 +1854,7 @@ global $wppa_exif_error_output;
|
|
1850 |
case '5': $result = __('Multi-segment', 'wp-photo-album-plus'); break;
|
1851 |
case '6': $result = __('Partial', 'wp-photo-album-plus'); break;
|
1852 |
case '255': $result = __('Other', 'wp-photo-album-plus'); break;
|
1853 |
-
default:
|
1854 |
-
$result = '<span title="' . esc_attr( __( 'reserved', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
|
1855 |
}
|
1856 |
return $result;
|
1857 |
break;
|
@@ -1913,8 +1916,7 @@ global $wppa_exif_error_output;
|
|
1913 |
case '89': $result = __('Auto, Fired, Red-eye reduction', 'wp-photo-album-plus'); break;
|
1914 |
case '93': $result = __('Auto, Fired, Red-eye reduction, Return not detected', 'wp-photo-album-plus'); break;
|
1915 |
case '95': $result = __('Auto, Fired, Red-eye reduction, Return detected', 'wp-photo-album-plus'); break;
|
1916 |
-
default:
|
1917 |
-
$result = '<span title="' . esc_attr( __( 'Unknown', 'wp-photo-album-plus' ) ) . ':' . $data . '" style="cursor:pointer;" >' . __( 'n.a.', 'wp-photo-album-plus' ) . '</span>';
|
1918 |
}
|
1919 |
|
1920 |
return $result;
|
@@ -1928,7 +1930,7 @@ global $wppa_exif_error_output;
|
|
1928 |
case 3: $result = 'cm'; break;
|
1929 |
case 4: $result = 'mm'; break;
|
1930 |
case 5: $result = 'μm'; break;
|
1931 |
-
default: $result =
|
1932 |
}
|
1933 |
|
1934 |
return $result;
|
@@ -1963,7 +1965,7 @@ global $wppa_exif_error_output;
|
|
1963 |
case 'S': $result = __( 'Secret', 'wp-photo-album-plus' ); break;
|
1964 |
case 'T': $result = __( 'Top Secret', 'wp-photo-album-plus' ); break;
|
1965 |
case 'U': $result = __( 'Unclassified', 'wp-photo-album-plus' ); break;
|
1966 |
-
default:
|
1967 |
}
|
1968 |
|
1969 |
return $result;
|
@@ -1982,7 +1984,7 @@ global $wppa_exif_error_output;
|
|
1982 |
case 6: $result = __( 'Monochrome linear', 'wp-photo-album-plus' ); break;
|
1983 |
case 7: $result = __( 'Trilinear', 'wp-photo-album-plus' ); break;
|
1984 |
case 8: $result = __( 'Color sequential linear', 'wp-photo-album-plus' ); break;
|
1985 |
-
default: $result =
|
1986 |
}
|
1987 |
|
1988 |
return $result;
|
@@ -2110,7 +2112,7 @@ global $wppa_exif_error_output;
|
|
2110 |
case 3: $result = 'cm'; break;
|
2111 |
case 4: $result = 'mm'; break;
|
2112 |
case 5: $result = 'μm'; break;
|
2113 |
-
default: $result =
|
2114 |
}
|
2115 |
|
2116 |
return $result;
|
@@ -2869,7 +2871,7 @@ global $wppa_exif_error_output;
|
|
2869 |
|
2870 |
// Empty data
|
2871 |
else {
|
2872 |
-
$result = '
|
2873 |
}
|
2874 |
|
2875 |
return $result;
|
@@ -2880,7 +2882,7 @@ global $wppa_exif_error_output;
|
|
2880 |
|
2881 |
// Must contain a '/'
|
2882 |
if ( strpos( $data, '/' ) == false ) {
|
2883 |
-
if ( $complain ) $wppa_exif_error_output =
|
2884 |
return false;
|
2885 |
}
|
2886 |
|
@@ -2889,13 +2891,13 @@ global $wppa_exif_error_output;
|
|
2889 |
|
2890 |
// Numeric?
|
2891 |
if ( ! is_numeric( $t[0] ) || ! is_numeric ( $t[1] ) ) {
|
2892 |
-
if ( $complain ) $wppa_exif_error_output =
|
2893 |
return false;
|
2894 |
}
|
2895 |
|
2896 |
// Divide by zero?
|
2897 |
if ( $t[1] == 0 ) {
|
2898 |
-
if ( $complain ) $wppa_exif_error_output =
|
2899 |
return false;
|
2900 |
}
|
2901 |
|
@@ -2906,7 +2908,7 @@ global $wppa_exif_error_output;
|
|
2906 |
|
2907 |
// Unlikely value?
|
2908 |
if ( $t[0] / $t[1] > 100000 || abs( $t[0] / $t[1] ) < 0.00001 ) {
|
2909 |
-
if ( $complain ) $wppa_exif_error_output =
|
2910 |
return false;
|
2911 |
}
|
2912 |
|
@@ -2971,7 +2973,7 @@ global $wppa_exif_error_output;
|
|
2971 |
|
2972 |
// Must be integer
|
2973 |
if ( ! wppa_is_int( $data ) ) {
|
2974 |
-
$wppa_exif_error_output =
|
2975 |
return false;
|
2976 |
}
|
2977 |
|
@@ -4314,7 +4316,7 @@ static $labels;
|
|
4314 |
}
|
4315 |
}
|
4316 |
|
4317 |
-
return
|
4318 |
}
|
4319 |
|
4320 |
// Get gps data from photofile
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* exif and iptc common functions
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*
|
9 |
*/
|
52 |
if ( ! empty( $iptcdata ) ) {
|
53 |
foreach ( $iptcdata as $iptcline ) {
|
54 |
$tag = $iptcline['tag'];
|
55 |
+
|
56 |
+
// Fix trailing 0000 for '2#055'
|
57 |
+
if ( $tag == '2#055' ) {
|
58 |
+
$t = $iptcline['description'];
|
59 |
+
if ( strlen( $t ) == 8 && substr( $t, 4 ) == '0000' ) {
|
60 |
+
$iptcline['description'] = substr( $t, 0, 4 );
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
if ( $prevtag == $tag ) { // add a next item for this tag
|
65 |
$combined .= ', '.htmlspecialchars( strip_tags( $iptcline['description'] ) );
|
66 |
}
|
99 |
// Remove untranslated
|
100 |
$pos = strpos($temp, '2#');
|
101 |
while ( $pos !== false ) {
|
102 |
+
$tmp = substr( $temp, 0, $pos ) . substr( $temp, $pos+5 );
|
103 |
$temp = $tmp;
|
104 |
$pos = strpos($temp, '2#');
|
105 |
}
|
187 |
foreach( $groups as $group ) {
|
188 |
$pos = strpos( $temp, $group );
|
189 |
while ( $pos !== false ) {
|
190 |
+
$tmp = substr( $temp, 0, $pos ) . substr( $temp, $pos+6 );
|
|
|
|
|
191 |
$temp = $tmp;
|
192 |
$pos = strpos( $temp, $group );
|
193 |
}
|
794 |
switch( $brand ) {
|
795 |
case 'SAMSUNG':
|
796 |
switch( $data ) {
|
797 |
+
case '0 0': $result = ''; break;
|
798 |
case 0: $result = __( 'Red', 'wp-photo-album-plus' ); break;
|
799 |
case 1: $result = __( 'Yellow', 'wp-photo-album-plus' ); break;
|
800 |
case 2: $result = __( 'Green', 'wp-photo-album-plus' ); break;
|
1584 |
|
1585 |
// Bogus data?
|
1586 |
if ( $x / $y > 100 || ( round( 10 * $x / $y ) / 10 ) == 0 ) {
|
1587 |
+
$result = '';
|
1588 |
return $result;
|
1589 |
}
|
1590 |
|
1697 |
case '7': $result = __('Portrait', 'wp-photo-album-plus'); break;
|
1698 |
case '8': $result = __('Landscape', 'wp-photo-album-plus'); break;
|
1699 |
case '9': $result = __('Bulb', 'wp-photo-album-plus'); break;
|
1700 |
+
default: $result = __('Unknown', 'wp-photo-album-plus' );
|
|
|
1701 |
}
|
1702 |
return $result;
|
1703 |
break;
|
1715 |
case '5': $result = __('Standard Output Sensitivity and ISO Speed', 'wp-photo-album-plus'); break;
|
1716 |
case '6': $result = __('Recommended Exposure Index and ISO Speed', 'wp-photo-album-plus'); break;
|
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;
|
1732 |
case '4': $result = 'R'; break;
|
1733 |
case '5': $result = 'G'; break;
|
1734 |
case '6': $result = 'B'; break;
|
1735 |
+
default: $result = '?';
|
|
|
1736 |
}
|
1737 |
return $result;
|
1738 |
break;
|
1826 |
$y = $temp[1];
|
1827 |
|
1828 |
if ( $x == 0 || $y == 0 || $x/$y > 1000 ) {
|
1829 |
+
$result = '';
|
1830 |
}
|
1831 |
else {
|
1832 |
if ( $temp[1] != 0 ) {
|
1854 |
case '5': $result = __('Multi-segment', 'wp-photo-album-plus'); break;
|
1855 |
case '6': $result = __('Partial', 'wp-photo-album-plus'); break;
|
1856 |
case '255': $result = __('Other', 'wp-photo-album-plus'); break;
|
1857 |
+
default: $result = __('reserved', 'wp-photo-album-plus');
|
|
|
1858 |
}
|
1859 |
return $result;
|
1860 |
break;
|
1916 |
case '89': $result = __('Auto, Fired, Red-eye reduction', 'wp-photo-album-plus'); break;
|
1917 |
case '93': $result = __('Auto, Fired, Red-eye reduction, Return not detected', 'wp-photo-album-plus'); break;
|
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;
|
1930 |
case 3: $result = 'cm'; break;
|
1931 |
case 4: $result = 'mm'; break;
|
1932 |
case 5: $result = 'μm'; break;
|
1933 |
+
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1934 |
}
|
1935 |
|
1936 |
return $result;
|
1965 |
case 'S': $result = __( 'Secret', 'wp-photo-album-plus' ); break;
|
1966 |
case 'T': $result = __( 'Top Secret', 'wp-photo-album-plus' ); break;
|
1967 |
case 'U': $result = __( 'Unclassified', 'wp-photo-album-plus' ); break;
|
1968 |
+
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
1969 |
}
|
1970 |
|
1971 |
return $result;
|
1984 |
case 6: $result = __( 'Monochrome linear', 'wp-photo-album-plus' ); break;
|
1985 |
case 7: $result = __( 'Trilinear', 'wp-photo-album-plus' ); break;
|
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;
|
2112 |
case 3: $result = 'cm'; break;
|
2113 |
case 4: $result = 'mm'; break;
|
2114 |
case 5: $result = 'μm'; break;
|
2115 |
+
default: $result = __( 'Unknown', 'wp-photo-album-plus' );
|
2116 |
}
|
2117 |
|
2118 |
return $result;
|
2871 |
|
2872 |
// Empty data
|
2873 |
else {
|
2874 |
+
$result = '';
|
2875 |
}
|
2876 |
|
2877 |
return $result;
|
2882 |
|
2883 |
// Must contain a '/'
|
2884 |
if ( strpos( $data, '/' ) == false ) {
|
2885 |
+
if ( $complain ) $wppa_exif_error_output = __( 'Missing /', 'wp-photo-album-plus' );
|
2886 |
return false;
|
2887 |
}
|
2888 |
|
2891 |
|
2892 |
// Numeric?
|
2893 |
if ( ! is_numeric( $t[0] ) || ! is_numeric ( $t[1] ) ) {
|
2894 |
+
if ( $complain ) $wppa_exif_error_output = __( 'Not rational', 'wp-photo-album-plus' );
|
2895 |
return false;
|
2896 |
}
|
2897 |
|
2898 |
// Divide by zero?
|
2899 |
if ( $t[1] == 0 ) {
|
2900 |
+
if ( $complain ) $wppa_exif_error_output = __( 'Divide by zero', 'wp-photo-album-plus' );
|
2901 |
return false;
|
2902 |
}
|
2903 |
|
2908 |
|
2909 |
// Unlikely value?
|
2910 |
if ( $t[0] / $t[1] > 100000 || abs( $t[0] / $t[1] ) < 0.00001 ) {
|
2911 |
+
if ( $complain ) $wppa_exif_error_output = __( 'Unlikely value', 'wp-photo-album-plus' );
|
2912 |
return false;
|
2913 |
}
|
2914 |
|
2973 |
|
2974 |
// Must be integer
|
2975 |
if ( ! wppa_is_int( $data ) ) {
|
2976 |
+
$wppa_exif_error_output = __( 'Invalid format', 'wp-photo-album-plus' );
|
2977 |
return false;
|
2978 |
}
|
2979 |
|
4316 |
}
|
4317 |
}
|
4318 |
|
4319 |
+
return '';
|
4320 |
}
|
4321 |
|
4322 |
// Get gps data from photofile
|
wppa-filter.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -105,6 +105,7 @@ global $wppa;
|
|
105 |
global $wppa_postid;
|
106 |
global $wppa_api_version;
|
107 |
global $wppa_revno;
|
|
|
108 |
|
109 |
$atts = shortcode_atts( array(
|
110 |
'type' => 'generic',
|
@@ -153,6 +154,7 @@ global $wppa_revno;
|
|
153 |
|
154 |
// Init
|
155 |
wppa_reset_occurrance();
|
|
|
156 |
|
157 |
// Caching?
|
158 |
$wppa['cache'] = $atts['cache'];
|
@@ -181,7 +183,21 @@ global $wppa_revno;
|
|
181 |
|
182 |
// If parent given, overwrite album by children
|
183 |
if ( $atts['parent'] !== '' ) {
|
184 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
}
|
186 |
|
187 |
// Find type
|
@@ -383,6 +399,7 @@ global $wppa_revno;
|
|
383 |
case 'url':
|
384 |
$wppa['is_url'] = true;
|
385 |
$wppa['single_photo'] = $atts['photo'];
|
|
|
386 |
break;
|
387 |
case 'choice':
|
388 |
$wppa['is_admins_choice'] = true;
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* get the albums via shortcode handler
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
105 |
global $wppa_postid;
|
106 |
global $wppa_api_version;
|
107 |
global $wppa_revno;
|
108 |
+
global $wppa_no_timer;
|
109 |
|
110 |
$atts = shortcode_atts( array(
|
111 |
'type' => 'generic',
|
154 |
|
155 |
// Init
|
156 |
wppa_reset_occurrance();
|
157 |
+
$wppa_no_timer = false;
|
158 |
|
159 |
// Caching?
|
160 |
$wppa['cache'] = $atts['cache'];
|
183 |
|
184 |
// If parent given, overwrite album by children
|
185 |
if ( $atts['parent'] !== '' ) {
|
186 |
+
$temp = explode( ',', $atts['parent'] );
|
187 |
+
|
188 |
+
// Test for virtual album
|
189 |
+
if ( is_array( $temp ) && count( $temp ) > 1 && wppa_is_enum( $temp[1] ) ) {
|
190 |
+
$temp[1] = wppa_alb_to_enum_children( $temp[1] );
|
191 |
+
$atts['album'] = implode( ',', $temp );
|
192 |
+
}
|
193 |
+
elseif ( wppa_is_enum( $atts['parent'] ) ) {
|
194 |
+
$atts['album'] = wppa_alb_to_enum_children( $atts['parent'] );
|
195 |
+
}
|
196 |
+
else {
|
197 |
+
wppa_bump_mocc();
|
198 |
+
$err = '<span style="color:red;" >[Error: Syntax error or unsupported parent specification: ' . $atts['parent'] . ']</span>';
|
199 |
+
return $err;
|
200 |
+
}
|
201 |
}
|
202 |
|
203 |
// Find type
|
399 |
case 'url':
|
400 |
$wppa['is_url'] = true;
|
401 |
$wppa['single_photo'] = $atts['photo'];
|
402 |
+
$wppa_no_timer = true;
|
403 |
break;
|
404 |
case 'choice':
|
405 |
$wppa['is_admins_choice'] = true;
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -323,7 +323,8 @@ global $locale;
|
|
323 |
wppa_reset_occurrance();
|
324 |
|
325 |
// Done
|
326 |
-
|
|
|
327 |
}
|
328 |
if ( wppa( 'is_admins_choice' ) ) {
|
329 |
$args = wppa( 'admins_choice_users' );
|
@@ -973,13 +974,8 @@ global $locale;
|
|
973 |
|
974 |
// Reset
|
975 |
wppa_reset_occurrance();
|
|
|
976 |
|
977 |
-
if ( wppa( 'is_url' ) ) {
|
978 |
-
$timer = '';
|
979 |
-
}
|
980 |
-
else {
|
981 |
-
$timer = wppa_occur_timer( 'show', $_SERVER['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ) );
|
982 |
-
}
|
983 |
return $out . $timer;
|
984 |
}
|
985 |
|
@@ -5888,6 +5884,10 @@ global $wpdb;
|
|
5888 |
function wppa_occur_timer( $key = '', $title = '', $cached = false, $delay = false ) {
|
5889 |
static $queries;
|
5890 |
static $time;
|
|
|
|
|
|
|
|
|
5891 |
|
5892 |
switch( $key ) {
|
5893 |
case 'init':
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
323 |
wppa_reset_occurrance();
|
324 |
|
325 |
// Done
|
326 |
+
$tim = wppa_occur_timer( 'show', $_SERVER['REQUEST_URI'], false, true );
|
327 |
+
return $out . $tim;
|
328 |
}
|
329 |
if ( wppa( 'is_admins_choice' ) ) {
|
330 |
$args = wppa( 'admins_choice_users' );
|
974 |
|
975 |
// Reset
|
976 |
wppa_reset_occurrance();
|
977 |
+
$timer = wppa_occur_timer( 'show', $_SERVER['REQUEST_URI'] . ' oc ' . wppa( 'mocc' ) );
|
978 |
|
|
|
|
|
|
|
|
|
|
|
|
|
979 |
return $out . $timer;
|
980 |
}
|
981 |
|
5884 |
function wppa_occur_timer( $key = '', $title = '', $cached = false, $delay = false ) {
|
5885 |
static $queries;
|
5886 |
static $time;
|
5887 |
+
global $wppa_no_timer;
|
5888 |
+
|
5889 |
+
// Do they want us?
|
5890 |
+
if ( $wppa_no_timer ) return '';
|
5891 |
|
5892 |
switch( $key ) {
|
5893 |
case 'init':
|
wppa-items.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions to retrieve album and photo items
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -389,7 +389,7 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
389 |
$mime = mime_content_type( $source );
|
390 |
}
|
391 |
else {
|
392 |
-
$mime =
|
393 |
}
|
394 |
$result = str_replace( 'w#mime', $mime, $result );
|
395 |
}
|
@@ -397,7 +397,7 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
397 |
$result = str_replace( 'w#exifdtm', $thumb['exifdtm'], $result );
|
398 |
$keywords = array( 'name', 'filename', 'id', 'tags', 'views', 'album', 'dlcount' );
|
399 |
foreach ( $keywords as $keyword ) {
|
400 |
-
$replacement = __( trim( stripslashes( $thumb[$keyword] ) )
|
401 |
if ( $keyword == 'tags' ) {
|
402 |
$replacement = trim( $replacement, ',' );
|
403 |
|
@@ -407,11 +407,10 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
407 |
foreach ( array_keys( $arr ) as $key ) {
|
408 |
$arr[$key] = ucfirst( $arr[$key] );
|
409 |
}
|
410 |
-
$replacement = implode( ',', $arr );
|
411 |
}
|
412 |
|
413 |
}
|
414 |
-
// if ( $replacement == '' ) $replacement = '‹'.__( 'none' , 'wp-photo-album-plus').'›';
|
415 |
$result = str_replace( 'w#'.$keyword, $replacement, $result );
|
416 |
}
|
417 |
|
@@ -452,9 +451,9 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
452 |
$result = str_replace( 'w#amfs', $amxy['s'], $result );
|
453 |
}
|
454 |
else {
|
455 |
-
$result = str_replace( 'w#amx',
|
456 |
-
$result = str_replace( 'w#amy',
|
457 |
-
$result = str_replace( 'w#amfs',
|
458 |
}
|
459 |
}
|
460 |
|
@@ -474,9 +473,10 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
474 |
$custom = $thumb['custom'];
|
475 |
$custom_data = $custom ? wppa_unserialize( $custom ) : array( '', '', '', '', '', '', '', '', '', '' );
|
476 |
for ( $i = '0'; $i < '10'; $i++ ) {
|
477 |
-
$rep =
|
478 |
$cap = __( wppa_opt( 'custom_caption_'.$i ) ); // Caption
|
479 |
$dis = wppa_switch( 'custom_visible_'.$i ); // Visible
|
|
|
480 |
|
481 |
if ( $cap && $rep && $dis ) { // Field defined and not empty and may be displayed
|
482 |
$result = str_replace( 'w#cc'.$i, $cap, $result ); // Caption
|
@@ -486,6 +486,7 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
486 |
$result = str_replace( 'w#cc'.$i, '', $result ); // Remove
|
487 |
$result = str_replace( 'w#cd'.$i, '', $result ); // Remove
|
488 |
}
|
|
|
489 |
}
|
490 |
}
|
491 |
|
@@ -496,14 +497,12 @@ function wppa_translate_photo_keywords( $id, $text ) {
|
|
496 |
$result = str_replace( 'w#duration', sprintf( '%s'%s".', $mins, $secs ), $result );
|
497 |
}
|
498 |
else {
|
499 |
-
$result = str_replace( 'w#duration',
|
500 |
}
|
501 |
}
|
502 |
|
503 |
-
//
|
504 |
-
$result = preg_replace(
|
505 |
-
'@<tr><td[^>]*?>[^<]*?</td><td[^>]*?>' . __( 'n.a.', 'wp-photo-album-plus' ) . '</td></tr>@siu' ),
|
506 |
-
array ( '', '' ), $result );
|
507 |
|
508 |
return $result;
|
509 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains functions to retrieve album and photo items
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
389 |
$mime = mime_content_type( $source );
|
390 |
}
|
391 |
else {
|
392 |
+
$mime = '';
|
393 |
}
|
394 |
$result = str_replace( 'w#mime', $mime, $result );
|
395 |
}
|
397 |
$result = str_replace( 'w#exifdtm', $thumb['exifdtm'], $result );
|
398 |
$keywords = array( 'name', 'filename', 'id', 'tags', 'views', 'album', 'dlcount' );
|
399 |
foreach ( $keywords as $keyword ) {
|
400 |
+
$replacement = __( trim( stripslashes( $thumb[$keyword] ) ) );
|
401 |
if ( $keyword == 'tags' ) {
|
402 |
$replacement = trim( $replacement, ',' );
|
403 |
|
407 |
foreach ( array_keys( $arr ) as $key ) {
|
408 |
$arr[$key] = ucfirst( $arr[$key] );
|
409 |
}
|
410 |
+
$replacement = implode( ', ', $arr );
|
411 |
}
|
412 |
|
413 |
}
|
|
|
414 |
$result = str_replace( 'w#'.$keyword, $replacement, $result );
|
415 |
}
|
416 |
|
451 |
$result = str_replace( 'w#amfs', $amxy['s'], $result );
|
452 |
}
|
453 |
else {
|
454 |
+
$result = str_replace( 'w#amx', '', $result );
|
455 |
+
$result = str_replace( 'w#amy', '', $result );
|
456 |
+
$result = str_replace( 'w#amfs', '', $result );
|
457 |
}
|
458 |
}
|
459 |
|
473 |
$custom = $thumb['custom'];
|
474 |
$custom_data = $custom ? wppa_unserialize( $custom ) : array( '', '', '', '', '', '', '', '', '', '' );
|
475 |
for ( $i = '0'; $i < '10'; $i++ ) {
|
476 |
+
$rep = stripslashes( $custom_data[$i] ); // Replacement
|
477 |
$cap = __( wppa_opt( 'custom_caption_'.$i ) ); // Caption
|
478 |
$dis = wppa_switch( 'custom_visible_'.$i ); // Visible
|
479 |
+
if ( $rep == ', , ' ) $rep = '';
|
480 |
|
481 |
if ( $cap && $rep && $dis ) { // Field defined and not empty and may be displayed
|
482 |
$result = str_replace( 'w#cc'.$i, $cap, $result ); // Caption
|
486 |
$result = str_replace( 'w#cc'.$i, '', $result ); // Remove
|
487 |
$result = str_replace( 'w#cd'.$i, '', $result ); // Remove
|
488 |
}
|
489 |
+
|
490 |
}
|
491 |
}
|
492 |
|
497 |
$result = str_replace( 'w#duration', sprintf( '%s'%s".', $mins, $secs ), $result );
|
498 |
}
|
499 |
else {
|
500 |
+
$result = str_replace( 'w#duration', '', $result );
|
501 |
}
|
502 |
}
|
503 |
|
504 |
+
// Remove empty lines
|
505 |
+
$result = preg_replace( '@<tr><td[^>]*?>[^<]*?</td><td[^>]*?></td></tr>@siu', '', $result );
|
|
|
|
|
506 |
|
507 |
return $result;
|
508 |
}
|
wppa-photo-admin-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2369,10 +2369,8 @@ function wppaToggleExif( id, count ) {
|
|
2369 |
}
|
2370 |
|
2371 |
echo '
|
2372 |
-
<td style="padding:0 4px;" >'
|
2373 |
-
<td style="padding:0 4px;" >' .
|
2374 |
-
( $exif['f_description'] == __( 'n.a.', 'wp-photo-album-plus' ) ? wppa_format_exif( $exif['tag'], $exif['description'] ) : $exif['f_description'] ) .
|
2375 |
-
'</td>
|
2376 |
</tr>';
|
2377 |
|
2378 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
2369 |
}
|
2370 |
|
2371 |
echo '
|
2372 |
+
<td style="padding:0 4px;" >' . $desc . '</td>
|
2373 |
+
<td style="padding:0 4px;" >' . wppa_format_exif( $exif['tag'], $exif['description'], $brand ) . '</td>
|
|
|
|
|
2374 |
</tr>';
|
2375 |
|
2376 |
}
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -3406,8 +3406,10 @@ global $wppa_supported_camara_brands;
|
|
3406 |
'Creation date',
|
3407 |
'Photographer',
|
3408 |
'City',
|
3409 |
-
'
|
3410 |
'Country',
|
|
|
|
|
3411 |
'Source',
|
3412 |
'Copyright',
|
3413 |
'Caption',
|
@@ -3421,6 +3423,8 @@ global $wppa_supported_camara_brands;
|
|
3421 |
'2#090',
|
3422 |
'2#095',
|
3423 |
'2#101',
|
|
|
|
|
3424 |
'2#115',
|
3425 |
'2#116',
|
3426 |
'2#120',
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
3406 |
'Creation date',
|
3407 |
'Photographer',
|
3408 |
'City',
|
3409 |
+
'State (Provinve)',
|
3410 |
'Country',
|
3411 |
+
'Sublocation',
|
3412 |
+
'Subloc, City, State, Country',
|
3413 |
'Source',
|
3414 |
'Copyright',
|
3415 |
'Caption',
|
3423 |
'2#090',
|
3424 |
'2#095',
|
3425 |
'2#101',
|
3426 |
+
'2#092',
|
3427 |
+
'2#092, 2#090, 2#095, 2#101',
|
3428 |
'2#115',
|
3429 |
'2#116',
|
3430 |
'2#120',
|
wppa-utils.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
-
* Version 7.4.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -2253,10 +2253,11 @@ function wppa_set_default_custom( $id, $force = false ) {
|
|
2253 |
$i = 0;
|
2254 |
while ( $i < 10 ) {
|
2255 |
$data = $custom[$i];
|
2256 |
-
if ( ! $data || $
|
2257 |
$data = wppa_opt( 'custom_default_' . $i, '' );
|
2258 |
$new_data = wppa_filter_iptc( $data, $id );
|
2259 |
$new_data = wppa_filter_exif( $new_data, $id );
|
|
|
2260 |
if ( $new_data != $data ) {
|
2261 |
$custom[$i] = $new_data;
|
2262 |
$any = true;
|
@@ -5113,4 +5114,4 @@ function _wppa_get_nesting_level( $id ) {
|
|
5113 |
else {
|
5114 |
return '0';
|
5115 |
}
|
5116 |
-
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains low-level utility routines
|
6 |
+
* Version 7.4.02
|
7 |
*
|
8 |
*/
|
9 |
|
2253 |
$i = 0;
|
2254 |
while ( $i < 10 ) {
|
2255 |
$data = $custom[$i];
|
2256 |
+
if ( ! $data || $force ) {
|
2257 |
$data = wppa_opt( 'custom_default_' . $i, '' );
|
2258 |
$new_data = wppa_filter_iptc( $data, $id );
|
2259 |
$new_data = wppa_filter_exif( $new_data, $id );
|
2260 |
+
$new_data = trim( $new_data, ', ' );
|
2261 |
if ( $new_data != $data ) {
|
2262 |
$custom[$i] = $new_data;
|
2263 |
$any = true;
|
5114 |
else {
|
5115 |
return '0';
|
5116 |
}
|
5117 |
+
}
|
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: 7.4.
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
@@ -23,8 +23,8 @@ global $wpdb;
|
|
23 |
global $wp_version;
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
-
global $wppa_revno; $wppa_revno = '
|
27 |
-
global $wppa_api_version; $wppa_api_version = '7.4.
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|
2 |
/*
|
3 |
* Plugin Name: WP Photo Album Plus
|
4 |
* Description: Easily manage and display your photo albums and slideshows within your WordPress site.
|
5 |
+
* Version: 7.4.02.002
|
6 |
* Author: J.N. Breetvelt a.k.a. OpaJaap
|
7 |
* Author URI: http://wppa.opajaap.nl/
|
8 |
* Plugin URI: http://wordpress.org/extend/plugins/wp-photo-album-plus/
|
23 |
global $wp_version;
|
24 |
|
25 |
/* WPPA GLOBALS */
|
26 |
+
global $wppa_revno; $wppa_revno = '7402'; // WPPA db version
|
27 |
+
global $wppa_api_version; $wppa_api_version = '7.4.02.002'; // WPPA software version
|
28 |
|
29 |
/* Init page js data */
|
30 |
global $wppa_js_page_data; $wppa_js_page_data = '';
|