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.2.04.001 |
Comparing to | |
See all releases |
Code changes from version 8.2.03.006 to 8.2.04.001
- changelog.txt +2 -2
- readme.txt +1 -1
- wppa-album-admin-autosave.php +32 -33
- wppa-functions.php +3 -3
- wppa-maintenance.php +3 -2
- wppa-photo-admin-autosave.php +3 -13
- wppa-settings-autosave.php +3 -3
- wppa-upload-common.php +151 -6
- wppa-wpdb-insert.php +1 -1
- wppa.php +5 -3
changelog.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
-
= 8.
|
4 |
|
5 |
* The display of the album and photo admin page has been restructured. Phase II
|
6 |
* You can now enter exif dates ending in 00 min and 00 sec.
|
7 |
-
* New album setting: Max
|
8 |
|
9 |
= 8.2.02 =
|
10 |
|
1 |
WP Photo Album Plus Changelog
|
2 |
|
3 |
+
= 8.3.01 =
|
4 |
|
5 |
* The display of the album and photo admin page has been restructured. Phase II
|
6 |
* You can now enter exif dates ending in 00 min and 00 sec.
|
7 |
+
* New album setting: Max children. This setting only limits the creation of child albums at the frontend and looks at first generation children only.
|
8 |
|
9 |
= 8.2.02 =
|
10 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, f
|
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.5
|
8 |
-
Stable tag: 8.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 6.0
|
7 |
Requires PHP: 5.5
|
8 |
+
Stable tag: 8.2.02.010
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
wppa-album-admin-autosave.php
CHANGED
@@ -3648,8 +3648,8 @@ global $wpdb;
|
|
3648 |
}
|
3649 |
}
|
3650 |
|
3651 |
-
|
3652 |
-
|
3653 |
$sel = ' selected';
|
3654 |
$opts = array(
|
3655 |
__( '--- default ---', 'wp-photo-album-plus' ),
|
@@ -3670,38 +3670,37 @@ global $wpdb;
|
|
3670 |
$dflt = $opts[$key];
|
3671 |
}
|
3672 |
}
|
3673 |
-
|
3674 |
-
$title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'misc', 1, 1 ), $dflt );
|
3675 |
-
$suba_order_by = wppa_get_album_item( $parent, 'suba_order_by' );
|
3676 |
-
$result = '
|
3677 |
-
<div style="margin-left:6px">
|
3678 |
-
<label
|
3679 |
-
for="subalbumorder">' .
|
3680 |
-
__( 'Subalbum sequence method', 'wp-photo-album-plus' ) . '
|
3681 |
-
</label><br>
|
3682 |
-
<select
|
3683 |
-
id="subalbumorder"
|
3684 |
-
style="max-width:200px;"
|
3685 |
-
onchange="
|
3686 |
-
wppaAjaxUpdateAlbum( ' . $parent . ', \'suba_order_by\', this );
|
3687 |
-
var ord=Math.abs(jQuery(this).val());
|
3688 |
-
var dft=Math.abs(' . wppa_opt('wppa_list_albums_by') . ');
|
3689 |
-
if (ord == 1 || (ord == 0 && dft == 1)) {
|
3690 |
-
jQuery(\'#wppa-album-sequence\').show();
|
3691 |
-
}
|
3692 |
-
else {
|
3693 |
-
jQuery(\'#wppa-album-sequence\').hide();
|
3694 |
-
}"
|
3695 |
-
title="' . esc_attr( $title ) . '"
|
3696 |
-
>';
|
3697 |
-
for ( $i = 0; $i < 7; $i++ ) {
|
3698 |
-
$result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
|
3699 |
-
}
|
3700 |
-
$result .= '
|
3701 |
-
</select>
|
3702 |
-
</div>';
|
3703 |
-
wppa_echo( $result );
|
3704 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3705 |
|
3706 |
// Check album order
|
3707 |
if ( $albumorder_col != 'a_order' ) {
|
3648 |
}
|
3649 |
}
|
3650 |
|
3651 |
+
// Subalbum order
|
3652 |
+
{
|
3653 |
$sel = ' selected';
|
3654 |
$opts = array(
|
3655 |
__( '--- default ---', 'wp-photo-album-plus' ),
|
3670 |
$dflt = $opts[$key];
|
3671 |
}
|
3672 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3673 |
}
|
3674 |
+
$title = sprintf( __( 'The default is set in %s and is currently set to %s', 'wp-photo-album-plus' ), wppa_setting_path( 'b', 'misc', 1, 1 ), $dflt );
|
3675 |
+
$suba_order_by = wppa_get_album_item( $parent, 'suba_order_by' );
|
3676 |
+
$result = '
|
3677 |
+
<div style="margin-left:6px">
|
3678 |
+
<label
|
3679 |
+
for="subalbumorder">' .
|
3680 |
+
__( 'Subalbum sequence method', 'wp-photo-album-plus' ) . '
|
3681 |
+
</label><br>
|
3682 |
+
<select
|
3683 |
+
id="subalbumorder"
|
3684 |
+
style="max-width:200px;"
|
3685 |
+
onchange="
|
3686 |
+
wppaAjaxUpdateAlbum( ' . $parent . ', \'suba_order_by\', this );
|
3687 |
+
var ord=Math.abs(jQuery(this).val());
|
3688 |
+
var dft=Math.abs(' . wppa_opt('wppa_list_albums_by') . ');
|
3689 |
+
if (ord == 1 || (ord == 0 && dft == 1)) {
|
3690 |
+
jQuery(\'#wppa-album-sequence\').show();
|
3691 |
+
}
|
3692 |
+
else {
|
3693 |
+
jQuery(\'#wppa-album-sequence\').hide();
|
3694 |
+
}"
|
3695 |
+
title="' . esc_attr( $title ) . '"
|
3696 |
+
>';
|
3697 |
+
for ( $i = 0; $i < 7; $i++ ) {
|
3698 |
+
$result .= '<option value="' . esc_attr( $vals[$i] ) . '" ' . ( $suba_order_by == $vals[$i] ? $sel : '' ) . ' >' . $opts[$i] . '</option>';
|
3699 |
+
}
|
3700 |
+
$result .= '
|
3701 |
+
</select>
|
3702 |
+
</div>';
|
3703 |
+
wppa_echo( $result );
|
3704 |
|
3705 |
// Check album order
|
3706 |
if ( $albumorder_col != 'a_order' ) {
|
wppa-functions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -5415,7 +5415,7 @@ global $wppa_alert;
|
|
5415 |
$videoy = 0;
|
5416 |
|
5417 |
// Fix possible framsize if video
|
5418 |
-
|
5419 |
|
5420 |
// Repair name if not standard
|
5421 |
if ( ! wppa_get( 'user-name' ) ) {
|
@@ -5566,7 +5566,7 @@ global $wppa_alert;
|
|
5566 |
wppa_check_coverimage( $id );
|
5567 |
|
5568 |
// If mp4, try ro find the framesize
|
5569 |
-
|
5570 |
|
5571 |
// Mail
|
5572 |
if ( wppa_get_photo_item( $id, 'status' ) == 'pending' ) {
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Various functions
|
6 |
+
* Version 8.2.04.001
|
7 |
*
|
8 |
*/
|
9 |
|
5415 |
$videoy = 0;
|
5416 |
|
5417 |
// Fix possible framsize if video
|
5418 |
+
wppa_fix_video_metadata( $id, 'av_add_front' );
|
5419 |
|
5420 |
// Repair name if not standard
|
5421 |
if ( ! wppa_get( 'user-name' ) ) {
|
5566 |
wppa_check_coverimage( $id );
|
5567 |
|
5568 |
// If mp4, try ro find the framesize
|
5569 |
+
wppa_fix_video_metadata( $id, 'single_front' );
|
5570 |
|
5571 |
// Mail
|
5572 |
if ( wppa_get_photo_item( $id, 'status' ) == 'pending' ) {
|
wppa-maintenance.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains (not yet, but in the future maybe) all the maintenance routines
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -829,7 +829,8 @@ global $wppa_endtime;
|
|
829 |
break;
|
830 |
|
831 |
case 'wppa_fix_mp4_meta':
|
832 |
-
|
|
|
833 |
break;
|
834 |
|
835 |
case 'wppa_fix_custom_tags':
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains (not yet, but in the future maybe) all the maintenance routines
|
6 |
+
* Version 8.2.04.001
|
7 |
*
|
8 |
*/
|
9 |
|
829 |
break;
|
830 |
|
831 |
case 'wppa_fix_mp4_meta':
|
832 |
+
wppa_fix_video_metadata( $id, 'maintproc' );
|
833 |
+
wppa_fix_audio_metadata( $id, 'maintproc' );
|
834 |
break;
|
835 |
|
836 |
case 'wppa_fix_custom_tags':
|
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.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -649,18 +649,8 @@ function wppaTryScheduledel( id ) {
|
|
649 |
|
650 |
// If no duration stored, try to find it and store it
|
651 |
if ( ! $duration ) {
|
652 |
-
|
653 |
-
|
654 |
-
if ( function_exists( 'wp_read_audio_metadata' ) ) {
|
655 |
-
$mp3info = wp_read_audio_metadata( $file );
|
656 |
-
if ( $mp3info ) {
|
657 |
-
$duration = $mp3info['length'];
|
658 |
-
if ( $duration ) {
|
659 |
-
wppa_update_photo( [ 'id' => $id, 'duration' => $duration ] );
|
660 |
-
}
|
661 |
-
}
|
662 |
-
}
|
663 |
-
}
|
664 |
}
|
665 |
}
|
666 |
wppa_echo( '
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* edit and delete photos
|
6 |
+
* Version 8.2.04.001
|
7 |
*
|
8 |
*/
|
9 |
|
649 |
|
650 |
// If no duration stored, try to find it and store it
|
651 |
if ( ! $duration ) {
|
652 |
+
wppa_fix_audio_metadata( $id, 'photoadmin' );
|
653 |
+
$duration = wppa_get_photo_item( $id, 'duration' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
654 |
}
|
655 |
}
|
656 |
wppa_echo( '
|
wppa-settings-autosave.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
-
* Version 8.2.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -8809,8 +8809,8 @@ global $wppa_subtab_names;
|
|
8809 |
$html = array($html1, $html2, $html3, $html4);
|
8810 |
wppa_setting_new(false, '31', $name, $desc, $html, $help);
|
8811 |
|
8812 |
-
$name = __('Fix mp4 meta data', 'wp-photo-album-plus' );
|
8813 |
-
$desc = __('Import framesize, creationdate and duration from mp4 video files', 'wp-photo-album-plus' );
|
8814 |
$help = '';
|
8815 |
$slug2 = 'wppa_fix_mp4_meta';
|
8816 |
$html1 = '';
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* manage all options
|
6 |
+
* Version 8.2.04.001
|
7 |
*
|
8 |
*/
|
9 |
|
8809 |
$html = array($html1, $html2, $html3, $html4);
|
8810 |
wppa_setting_new(false, '31', $name, $desc, $html, $help);
|
8811 |
|
8812 |
+
$name = __('Fix mp3 and mp4 meta data', 'wp-photo-album-plus' );
|
8813 |
+
$desc = __('Import framesize, creationdate, orientation and duration from mp4 video files, duration from mp3 audio files', 'wp-photo-album-plus' );
|
8814 |
$help = '';
|
8815 |
$slug2 = 'wppa_fix_mp4_meta';
|
8816 |
$html1 = '';
|
wppa-upload-common.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains common upload functions
|
6 |
-
* Version 8.
|
7 |
*
|
8 |
*/
|
9 |
|
@@ -397,7 +397,7 @@ function wppa_upload_post_process( $the_type, $album, $id, $from ) {
|
|
397 |
}
|
398 |
}
|
399 |
|
400 |
-
|
401 |
}
|
402 |
|
403 |
// To check on possible duplicate
|
@@ -441,7 +441,7 @@ global $wpdb;
|
|
441 |
|
442 |
// Try to find the framesize of a video, and update the items db entry if found.
|
443 |
// Return true on success, false on failure
|
444 |
-
function
|
445 |
|
446 |
// Is it a video?
|
447 |
$files = wppa_is_video( $id );
|
@@ -455,14 +455,15 @@ function wppa_fix_video_framesize( $id, $where ) {
|
|
455 |
// Does file exist?
|
456 |
$file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp4';
|
457 |
if ( ! wppa_is_file( $file ) ) {
|
458 |
-
wppa_log( 'dbg', '
|
459 |
}
|
460 |
|
461 |
// Get the info
|
462 |
if ( ! function_exists( 'wp_read_video_metadata' ) ) {
|
463 |
require_once ABSPATH . 'wp-admin/includes/media.php';
|
464 |
}
|
465 |
-
|
|
|
466 |
|
467 |
// Make sure its a video
|
468 |
if ( $mp4info['fileformat'] != 'mp4' ) {
|
@@ -473,6 +474,20 @@ function wppa_fix_video_framesize( $id, $where ) {
|
|
473 |
// Find sizes
|
474 |
$videox = isset( $mp4info['width'] ) ? $mp4info['width'] : '0';
|
475 |
$videoy = isset( $mp4info['height'] ) ? $mp4info['height'] : '0';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
476 |
|
477 |
// Update item
|
478 |
wppa_update_photo( array( 'id' => $id,
|
@@ -498,7 +513,137 @@ function wppa_fix_video_framesize( $id, $where ) {
|
|
498 |
}
|
499 |
else $exifdtm = '';
|
500 |
|
501 |
-
wppa_log( 'dbg', 'MP4 Metadata found (' . $videox . 'x' . $videoy . '), ' . $duration . ', ' . $exifdtm . ' in ' . $file . ' ' . $where );
|
502 |
|
503 |
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
}
|
3 |
* Package: wp-photo-album-plus
|
4 |
*
|
5 |
* Contains common upload functions
|
6 |
+
* Version 8.2.04.001
|
7 |
*
|
8 |
*/
|
9 |
|
397 |
}
|
398 |
}
|
399 |
|
400 |
+
wppa_fix_video_metadata( $id, $from );
|
401 |
}
|
402 |
|
403 |
// To check on possible duplicate
|
441 |
|
442 |
// Try to find the framesize of a video, and update the items db entry if found.
|
443 |
// Return true on success, false on failure
|
444 |
+
function wppa_fix_video_metadata( $id, $where ) {
|
445 |
|
446 |
// Is it a video?
|
447 |
$files = wppa_is_video( $id );
|
455 |
// Does file exist?
|
456 |
$file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp4';
|
457 |
if ( ! wppa_is_file( $file ) ) {
|
458 |
+
wppa_log( 'dbg', 'wppa_fix_video_metadata quit because ' . $file . ' does not exists' );
|
459 |
}
|
460 |
|
461 |
// Get the info
|
462 |
if ( ! function_exists( 'wp_read_video_metadata' ) ) {
|
463 |
require_once ABSPATH . 'wp-admin/includes/media.php';
|
464 |
}
|
465 |
+
//
|
466 |
+
$mp4info = wppa_read_video_metadata( $file );
|
467 |
|
468 |
// Make sure its a video
|
469 |
if ( $mp4info['fileformat'] != 'mp4' ) {
|
474 |
// Find sizes
|
475 |
$videox = isset( $mp4info['width'] ) ? $mp4info['width'] : '0';
|
476 |
$videoy = isset( $mp4info['height'] ) ? $mp4info['height'] : '0';
|
477 |
+
|
478 |
+
// Rotated?
|
479 |
+
if ( isset( $mp4info['rotate'] ) ) {
|
480 |
+
$rot = $mp4info['rotate'];
|
481 |
+
if ( $rot == 90 || $rot == 270 ) {
|
482 |
+
$t = $videox;
|
483 |
+
$videox = $videoy;
|
484 |
+
$videoy = $t;
|
485 |
+
}
|
486 |
+
}
|
487 |
+
else {
|
488 |
+
$rot = 0;
|
489 |
+
wppa_log('obs', 'No rotate info avail');
|
490 |
+
}
|
491 |
|
492 |
// Update item
|
493 |
wppa_update_photo( array( 'id' => $id,
|
513 |
}
|
514 |
else $exifdtm = '';
|
515 |
|
516 |
+
wppa_log( 'dbg', 'MP4 Metadata found (' . $videox . 'x' . $videoy . '), ' . $duration . ', ' . $exifdtm . ' in ' . $file . ' ' . $where . ' ' . $rot );
|
517 |
|
518 |
return true;
|
519 |
+
}
|
520 |
+
|
521 |
+
// Find duration of audio
|
522 |
+
function wppa_fix_audio_metadata( $id, $where ) {
|
523 |
+
|
524 |
+
$file = wppa_strip_ext( wppa_get_photo_path( $id ) ) . '.mp3';
|
525 |
+
if ( wppa_is_file( $file ) ) {
|
526 |
+
if ( function_exists( 'wp_read_audio_metadata' ) ) {
|
527 |
+
$mp3info = wp_read_audio_metadata( $file );
|
528 |
+
if ( $mp3info ) {
|
529 |
+
$duration = $mp3info['length'];
|
530 |
+
if ( $duration ) {
|
531 |
+
wppa_update_photo( ['id' => $id, 'duration' => $duration] );
|
532 |
+
}
|
533 |
+
}
|
534 |
+
}
|
535 |
+
}
|
536 |
+
}
|
537 |
+
|
538 |
+
// This function is equal to wp_read_video_metadata() except it also returns ['rotate']
|
539 |
+
function wppa_read_video_metadata( $file ) {
|
540 |
+
if ( ! file_exists( $file ) ) {
|
541 |
+
return false;
|
542 |
+
}
|
543 |
+
|
544 |
+
$metadata = array();
|
545 |
+
|
546 |
+
if ( ! defined( 'GETID3_TEMP_DIR' ) ) {
|
547 |
+
define( 'GETID3_TEMP_DIR', get_temp_dir() );
|
548 |
+
}
|
549 |
+
|
550 |
+
if ( ! class_exists( 'getID3', false ) ) {
|
551 |
+
require ABSPATH . WPINC . '/ID3/getid3.php';
|
552 |
+
}
|
553 |
+
|
554 |
+
$id3 = new getID3();
|
555 |
+
// Required to get the `created_timestamp` value.
|
556 |
+
$id3->options_audiovideo_quicktime_ReturnAtomData = true; // phpcs:ignore WordPress.NamingConventions.ValidVariableName
|
557 |
+
|
558 |
+
$data = $id3->analyze( $file );
|
559 |
+
|
560 |
+
if ( isset( $data['video']['lossless'] ) ) {
|
561 |
+
$metadata['lossless'] = $data['video']['lossless'];
|
562 |
+
}
|
563 |
+
|
564 |
+
if ( ! empty( $data['video']['bitrate'] ) ) {
|
565 |
+
$metadata['bitrate'] = (int) $data['video']['bitrate'];
|
566 |
+
}
|
567 |
+
|
568 |
+
if ( ! empty( $data['video']['bitrate_mode'] ) ) {
|
569 |
+
$metadata['bitrate_mode'] = $data['video']['bitrate_mode'];
|
570 |
+
}
|
571 |
+
|
572 |
+
if ( ! empty( $data['filesize'] ) ) {
|
573 |
+
$metadata['filesize'] = (int) $data['filesize'];
|
574 |
+
}
|
575 |
+
|
576 |
+
if ( ! empty( $data['mime_type'] ) ) {
|
577 |
+
$metadata['mime_type'] = $data['mime_type'];
|
578 |
+
}
|
579 |
+
|
580 |
+
if ( ! empty( $data['playtime_seconds'] ) ) {
|
581 |
+
$metadata['length'] = (int) round( $data['playtime_seconds'] );
|
582 |
+
}
|
583 |
+
|
584 |
+
if ( ! empty( $data['playtime_string'] ) ) {
|
585 |
+
$metadata['length_formatted'] = $data['playtime_string'];
|
586 |
+
}
|
587 |
+
|
588 |
+
if ( ! empty( $data['video']['resolution_x'] ) ) {
|
589 |
+
$metadata['width'] = (int) $data['video']['resolution_x'];
|
590 |
+
}
|
591 |
+
|
592 |
+
if ( ! empty( $data['video']['resolution_y'] ) ) {
|
593 |
+
$metadata['height'] = (int) $data['video']['resolution_y'];
|
594 |
+
}
|
595 |
+
|
596 |
+
if ( ! empty( $data['fileformat'] ) ) {
|
597 |
+
$metadata['fileformat'] = $data['fileformat'];
|
598 |
+
}
|
599 |
+
|
600 |
+
if ( ! empty( $data['video']['dataformat'] ) ) {
|
601 |
+
$metadata['dataformat'] = $data['video']['dataformat'];
|
602 |
+
}
|
603 |
+
|
604 |
+
if ( ! empty( $data['video']['encoder'] ) ) {
|
605 |
+
$metadata['encoder'] = $data['video']['encoder'];
|
606 |
+
}
|
607 |
+
|
608 |
+
if ( ! empty( $data['video']['codec'] ) ) {
|
609 |
+
$metadata['codec'] = $data['video']['codec'];
|
610 |
+
}
|
611 |
+
|
612 |
+
if ( ! empty( $data['audio'] ) ) {
|
613 |
+
unset( $data['audio']['streams'] );
|
614 |
+
$metadata['audio'] = $data['audio'];
|
615 |
+
}
|
616 |
+
|
617 |
+
// Start addition
|
618 |
+
if ( ! empty( $data['video']['rotate'] ) ) {
|
619 |
+
$metadata['rotate'] = $data['video']['rotate'];
|
620 |
+
}
|
621 |
+
// End addition
|
622 |
+
|
623 |
+
if ( empty( $metadata['created_timestamp'] ) ) {
|
624 |
+
$created_timestamp = wp_get_media_creation_timestamp( $data );
|
625 |
+
|
626 |
+
if ( false !== $created_timestamp ) {
|
627 |
+
$metadata['created_timestamp'] = $created_timestamp;
|
628 |
+
}
|
629 |
+
}
|
630 |
+
|
631 |
+
wp_add_id3_tag_data( $metadata, $data );
|
632 |
+
|
633 |
+
$file_format = isset( $metadata['fileformat'] ) ? $metadata['fileformat'] : null;
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Filters the array of metadata retrieved from a video.
|
637 |
+
*
|
638 |
+
* In core, usually this selection is what is stored.
|
639 |
+
* More complete data can be parsed from the `$data` parameter.
|
640 |
+
*
|
641 |
+
* @since 4.9.0
|
642 |
+
*
|
643 |
+
* @param array $metadata Filtered Video metadata.
|
644 |
+
* @param string $file Path to video file.
|
645 |
+
* @param string $file_format File format of video, as analyzed by getID3.
|
646 |
+
* @param array $data Raw metadata from getID3.
|
647 |
+
*/
|
648 |
+
return apply_filters( 'wp_read_video_metadata', $metadata, $file, $file_format, $data );
|
649 |
}
|
wppa-wpdb-insert.php
CHANGED
@@ -547,7 +547,7 @@ global $wpdb;
|
|
547 |
$args['upload_limit_tree'],
|
548 |
$args['scheduledel'],
|
549 |
$args['status'],
|
550 |
-
$args['max_children']
|
551 |
);
|
552 |
$iret = $wpdb->query( $query );
|
553 |
|
547 |
$args['upload_limit_tree'],
|
548 |
$args['scheduledel'],
|
549 |
$args['status'],
|
550 |
+
$args['max_children'],
|
551 |
);
|
552 |
$iret = $wpdb->query( $query );
|
553 |
|
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.2.
|
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.2.
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|
@@ -77,7 +77,9 @@ if ( ! defined('WPPA_MULTISITE_BLOGSDIR') ) {
|
|
77 |
|
78 |
/* To run WPPA+ in a multisite new style, new implementation mode,
|
79 |
/* add to wp-config.php: define('WPPA_MULTISITE_INDIVIDUAL', true); */
|
80 |
-
|
|
|
|
|
81 |
|
82 |
/* Choose the right db prifix */
|
83 |
if ( is_multisite() && WPPA_MULTISITE_GLOBAL ) {
|
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.2.04.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.2.04.001'; // WPPA software version
|
28 |
global $wppa_revno;
|
29 |
$wppa_revno = str_replace( '.', '', $wppa_api_version ); // WPPA db version
|
30 |
|
77 |
|
78 |
/* To run WPPA+ in a multisite new style, new implementation mode,
|
79 |
/* add to wp-config.php: define('WPPA_MULTISITE_INDIVIDUAL', true); */
|
80 |
+
if ( ! defined('WPPA_MULTISITE_INDIVIDUAL') ) {
|
81 |
+
define( 'WPPA_MULTISITE_INDIVIDUAL', false );
|
82 |
+
}
|
83 |
|
84 |
/* Choose the right db prifix */
|
85 |
if ( is_multisite() && WPPA_MULTISITE_GLOBAL ) {
|