WP Photo Album Plus - Version 7.2.10.005

Version Description

= 7.2.10 =

  • This version addresses various bug fixes and feature requests.

= 7.2.09 =

  • This version addresses various bug fixes and feature requests.

= 7.2.08 =

  • This version addresses various bug fixes.

= 7.2.07 =

  • This version addresses various bug fixes.

= 7.2.06 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.05 =

  • This version addresses various bug fixes and feature requests.
  • This version addresses various security issues.

= 7.2.04 =

  • This version addresses various bug fixes and feature requests.

= 7.2.03 =

  • This version addresses various bug fixes and feature requests.

= 7.2.02 =

  • This version addresses various bug fixes and feature requests.

= 7.2.01 =

  • This version addresses various bug fixes and feature requests.

= 7.2.00 =

  • This version addresses various bug fixes and feature requests.

= 7.1.11 =

  • This version addresses various bug fixes and feature requests.

= 7.1.10 =

  • This version addresses various bug fixes and feature requests.

= 7.1.09 =

  • This version addresses various bug fixes and feature requests.

= 7.1.08 =

  • This version addresses various bug fixes and feature requests.

= 7.1.07 =

  • This version addresses various bug fixes and feature requests.

= 7.1.06 =

  • This version addresses various bug fixes and feature requests.

= 7.1.05 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.04 =

  • This version addresses various bug fixes.

= 7.1.03 =

  • This version addresses various security issues.
  • This version addresses various bug fixes.

= 7.1.02 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.1.01 =

  • This version addresses various bug fixes and feature requests.

= 7.1.00 =

  • This version addresses various bug fixes and feature requests.
  • The Photo Album -> Upload Photos and Import Photos admin pages have been substantially improved. Read the changelog for details.

= 7.0.11 =

  • This version addresses various bug fixes and feature requests.

= 7.0.11 =

  • This version addresses various bug fixes

= 7.0.10 =

  • This version addresses various bug fixes

= 7.0.09 =

  • This version addresses various security issues.
  • This version addresses various bug fixes and feature requests.

= 7.0.08 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.07 =

  • This version addresses various security issues.
  • This version addresses various bug fixes

= 7.0.06 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.05 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 7.0.04 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.03 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.02 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 7.0.01 =

  • This version addresses various minor bug fixes and feature requests.

= 7.0.00 =

  • Shortcode generators for Gutenberg added.
  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.
  • To prevent spamming and give the users the opportunity to decide when they want us to email them, the mailing system has been revised. Configure Table IX-M to enable various mailing lists, and use the WPPA+ Notify widget for full user flexibility.

= 6.9.21 =

  • This version addresses various bug fixes
  • This version addresses various security issues.

= 6.9.20 =

  • This version addresses various bug fixes

= 6.9.19 =

  • This version addresses various minor bug fixes

= 6.9.18 =

  • This version addresses various minor bug fixes

= 6.9.17 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.16 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.15 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.14 =

  • This version addresses various minor bug fixes and feature requests.
  • This version addresses various security issues.

= 6.9.13 =

  • Security release.

= 6.9.12 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.11 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.10 =

  • This version addresses various minor bug fixes and performance improvements.

= 6.9.09 =

  • Panorama support phase III.

= 6.9.08 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase II.

= 6.9.07 =

  • This version addresses various minor bug fixes and feature requests.
  • Panorama support phase I.

= 6.9.06 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.05 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.04 =

  • This version addresses various minor bug fixes and feature requests.
  • Local CDN functionality has been added.

= 6.9.03 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.02 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.01 =

  • This version addresses various minor bug fixes and feature requests.

= 6.9.00 =

  • This version includes the code for the privacy policy requirements.

= 6.8.09

  • This version addresses various bug fixes and code edits.

= 6.8.08 =

  • This version addresses various minor bug fixes and feature requests.
  • This version offers substantial performance improvements when the box in Table IV-A13: Defer Javascript is ticked. This setting is now recommended and set ticked as the default.
  • For more info on performance improvements and compatibility with optimizers: see the changelog.txt

= 6.8.07 =

  • This version addresses various minor bug fixes and enhancements, and a new widget: Statistics.

= 6.8.06 =

  • This version addresses various minor bug fixes and improved cache handling.

= 6.8.05 =

  • This version addresses various minor bug fixes and feture requests.

= 6.8.04 =

  • This version addresses various display issues and a few fixes of bugs that seldom affected the plugins behaviour.
Download this release

Release Info

Developer opajaap
Plugin Icon wp plugin WP Photo Album Plus
Version 7.2.10.005
Comparing to
See all releases

Code changes from version 7.2.10.001 to 7.2.10.005

changelog.txt CHANGED
@@ -3,15 +3,21 @@ WP Photo Album Plus Changelog
3
  = 7.2.10 =
4
 
5
  * When the status of a photo is set to 'featured' it will be inserted in the standard wp media library,
6
- now also works for mp4 videos.
 
 
 
 
 
 
7
 
8
  = 7.2.09 =
9
 
10
  * Gutenberg preview of wppa gallery shorcodes now also works when Table IX-A1.3 is ticked.
11
- * When uploading/importing an mp4 file, an attempt will be made to find the actual framesize,
12
  the timestamp and the duration of the video. If found it will be registered.
13
  * New maintenance proc Table VIII-B22: Fix mp4 meta data, to fix the metadata for the existing items.
14
- * When the status of a photo is set to 'featured' it will be inserted in the standard wp media library,
15
  so it can be used as featured image in a page/post. Changing the status threafter has no effect.
16
  * Calendar vieuw with all open did no longer work. Fixed.
17
 
3
  = 7.2.10 =
4
 
5
  * When the status of a photo is set to 'featured' it will be inserted in the standard wp media library,
6
+ now also works for mp4 videos.
7
+ * On the Moderate Photos admin page when there are no photos to moderate,
8
+ the page displayes all photos in the system by timestamp desc for administrators.
9
+ In this case the pagelinks were missing. Fixed.
10
+ * New shorcode attribute values for type="calendar". The new values are 'realtimestamp', 'realmodified' and 'realexifdtm' for the attribute calendar="",
11
+ so you can now have a 'real look' calendar using shortcode: [wppa type="calendar" calendar="realexifdtm"], optionally add the album="" attribute.
12
+ Note: Only numeric albums or numeric album enumerations are supported. E.g. album="7" or album="1.5..8.19", meaning albums 1,5,6,7,8 and 19.
13
 
14
  = 7.2.09 =
15
 
16
  * Gutenberg preview of wppa gallery shorcodes now also works when Table IX-A1.3 is ticked.
17
+ * When uploading/importing an mp4 file, an attempt will be made to find the actual framesize,
18
  the timestamp and the duration of the video. If found it will be registered.
19
  * New maintenance proc Table VIII-B22: Fix mp4 meta data, to fix the metadata for the existing items.
20
+ * When the status of a photo is set to 'featured' it will be inserted in the standard wp media library,
21
  so it can be used as featured image in a page/post. Changing the status threafter has no effect.
22
  * Calendar vieuw with all open did no longer work. Fixed.
23
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
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&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 7.2.10.001
6
  Stable tag: 7.2.09.004
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
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&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
+ Version: 7.2.10.005
6
  Stable tag: 7.2.09.004
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
theme/wppa-style.css CHANGED
@@ -8,7 +8,7 @@
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
- /* This is version 7.2.04
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
@@ -493,4 +493,39 @@ display:none;
493
  text-align:center;
494
  width:60%;
495
  border:none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  }
8
  /*
9
  /* You may always look into a newer version of this file to see what new classes and id's come with an upgrade
10
  /*
11
+ /* This is version 7.2.10
12
  */
13
 
14
  .wppa-container, .wppa-cover-box, .wppa-thumb-area {
493
  text-align:center;
494
  width:60%;
495
  border:none;
496
+ }
497
+
498
+ /* Real calendar */
499
+ .wppa-real-calendar {
500
+
501
+ }
502
+ .wppa-real-calendar-table {
503
+
504
+ }
505
+ .wppa-real-calendar-head {
506
+ font-weight:bold;
507
+ }
508
+ .wppa-real-calendar-caption {
509
+ text-align:center;
510
+ font-size:1.8em;
511
+ }
512
+ .wppa-real-calendar-days {
513
+
514
+ }
515
+ .wppa-real-calendar-day-label {
516
+ text-align:center;
517
+ font-size:1.4em;
518
+ }
519
+ .wppa-real-calendar-body {
520
+
521
+ }
522
+ .wppa-real-calendar-week {
523
+
524
+ }
525
+ .wppa-real-calendar-dummy {
526
+ text-align:center;width:14%;
527
+ }
528
+ .wppa-real-calendar-day {
529
+ text-align:center;width:14%;
530
+ font-size:1.2em;
531
  }
wppa-boxes-html.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
- * Version 7.2.09
7
  *
8
  */
9
 
@@ -4770,7 +4770,7 @@ global $wpdb;
4770
 
4771
  default:
4772
  if ( $calendar_type ) {
4773
- wppa_log( 'err', 'Unexpected calender type: ' . $calendar_type . ' found in wppa_get_calendar_html()', true );
4774
  }
4775
  }
4776
 
@@ -4930,6 +4930,326 @@ global $wpdb;
4930
  return $result;
4931
  }
4932
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4933
  // Stereo settings box
4934
  function wppa_stereo_box() {
4935
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various wppa boxes
6
+ * Version 7.2.10
7
  *
8
  */
9
 
4770
 
4771
  default:
4772
  if ( $calendar_type ) {
4773
+ wppa_log( 'err', 'Unexpected calendar type: ' . $calendar_type . ' found in wppa_get_calendar_html()', true );
4774
  }
4775
  }
4776
 
4930
  return $result;
4931
  }
4932
 
4933
+ // The real calendar box
4934
+ function wppa_real_calendar_box() {
4935
+
4936
+ if ( is_feed() ) return;
4937
+
4938
+ // The calendar container
4939
+ wppa_container( 'open' );
4940
+
4941
+ $year = wppa_get_get( 'calendar-year' );//0;
4942
+ // if ( isset( $_REQUEST['calendar-year'] ) ) {
4943
+ // $year = intval( $_REQUEST['calendar-year'] );
4944
+ // }
4945
+ $month = wppa_get_get( 'calendar-month' );//0;
4946
+ // if ( isset( $_REQUEST['calendar-month'] ) ) {
4947
+ // $year = intval( $_REQUEST['calendar-month'] );
4948
+ // }
4949
+ wppa_out( '<div' .
4950
+ ' id="wppa-calendar-' . wppa( 'mocc' ) . '"' .
4951
+ ' class="wppa-box wppa-calendar"' .
4952
+ ' style="' .
4953
+ // 'font-size:10px;' .
4954
+ // 'line-height:12px;' .
4955
+ wppa_wcs( 'wppa-box' ) .
4956
+ wppa_wcs( 'wppa-calendar' ) .
4957
+ '"' .
4958
+ ' >' .
4959
+ '<div style="overflow:auto;" >' .
4960
+ wppa_get_real_calendar_html( $year, $month ) .
4961
+ '</div>' .
4962
+ '<div class="wppa-clear" style="' . wppa_wis( 'clear:both;' ) . '" >' .
4963
+ '</div>' .
4964
+ '</div>' );
4965
+
4966
+ wppa_container( 'close' );
4967
+ }
4968
+
4969
+ // The real calendar html
4970
+ function wppa_get_real_calendar_html( $year = 0, $month = 0 ) {
4971
+ global $wpdb;
4972
+
4973
+ // If no year given, default to current local year
4974
+ if ( ! $year ) {
4975
+ $year = wppa_local_date( 'Y', time() );
4976
+ }
4977
+
4978
+ // If no month given, default to current local month
4979
+ if ( ! $month ) {
4980
+ $month = wppa_local_date( 'm', time() );
4981
+ }
4982
+
4983
+ // Is it the current month?
4984
+ $is_this_month = wppa_local_date( 'Y', time() ) == $year && wppa_local_date( 'm', time() ) == $month;
4985
+
4986
+ // Get other init data
4987
+ $mocc = wppa( 'mocc' );
4988
+ $days_in_month = wppa_local_date( 't', wppa_local_strtotime( $year . '-' . $month . '-01' ) );
4989
+ $num_of_weeks = ( $days_in_month % 7== 0 ? 0 : 1 ) + intval( $days_in_month / 7 );
4990
+ $month_ending_day = wppa_local_date( 'N', wppa_local_strtotime( $year . '-' . $month . '-' . $days_in_month ) );
4991
+ $month_start_day = wppa_local_date( 'N', wppa_local_strtotime( $year . '-' . $month . '-01' ) );
4992
+ if ( $month_ending_day < $month_start_day ) {
4993
+ $num_of_weeks++;
4994
+ }
4995
+ $first_day_of_the_week = wppa_local_date( 'N', wppa_local_strtotime( $year . '-' . $month . '-01' ) );
4996
+ $day_labels = array(__("Mon"),__("Tue"),__("Wed"),__("Thu"),__("Fri"),__("Sat"),__("Sun"));
4997
+ $month_labels = array(__("January"),__("February"),__("March"),__("April"),__("May"),__("June"),__("July"),__("August"),__("September"),__("October"),__("November"),__("December"));
4998
+ $current_day = 0;
4999
+ $pm = $month - 1;
5000
+ if ( ! $pm ) {
5001
+ $pm = 12;
5002
+ $py = $year - 1;
5003
+ }
5004
+ else {
5005
+ $py = $year;
5006
+ }
5007
+ $nm = $month + 1;
5008
+ if ( $nm == 13 ) {
5009
+ $nm = 1;
5010
+ $ny = $year + 1;
5011
+ }
5012
+ else {
5013
+ $ny = $year;
5014
+ }
5015
+
5016
+ // Album spec?
5017
+ // if ( ! wppa( 'start_album' ) ) {
5018
+ // wppa( 'start_album', wppa_get_get( 'album' ) );
5019
+ // }
5020
+ if ( wppa( 'start_album' ) ) {
5021
+ if ( strpos( wppa( 'start_album' ), '$' ) !== false ) {
5022
+ wppa( 'start_album', wppa_album_name_to_number( wppa( 'start_album' )));
5023
+ }
5024
+ $albums = str_replace( '.', ',', wppa_expand_enum( wppa( 'start_album' ) ) );
5025
+ $alb_arg = 'wppa-album=' . str_replace( ',', '.', $albums . '&amp;' );
5026
+ }
5027
+ else {
5028
+ $albums = '';
5029
+ $alb_arg = '';
5030
+ }
5031
+
5032
+ // Prev month link
5033
+ $ajaxurl = wppa_encrypt_url(
5034
+ wppa_get_ajaxlink() .
5035
+ 'wppa-calendar=' . wppa( 'calendar' ) . '&amp;' .
5036
+ 'wppa-calendar-year=' . $py . '&amp;' .
5037
+ 'wppa-calendar-month=' . $pm . '&amp;' .
5038
+ $alb_arg .
5039
+ 'wppa-occur=' . $mocc
5040
+ );
5041
+
5042
+ $prev_month_link = '
5043
+ <span
5044
+ style="float:left;cursor:pointer;"
5045
+ title="' . ucfirst( $month_labels[$pm-1] ) . ' ' . $py . '"
5046
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . $ajaxurl . '\');"
5047
+ >&lt;</span>';
5048
+
5049
+ // Next month link
5050
+ $ajaxurl = wppa_encrypt_url(
5051
+ wppa_get_ajaxlink() .
5052
+ 'wppa-calendar=' . wppa( 'calendar' ) . '&amp;' .
5053
+ 'wppa-calendar-year=' . $ny . '&amp;' .
5054
+ 'wppa-calendar-month=' . $nm . '&amp;' .
5055
+ $alb_arg .
5056
+ 'wppa-occur=' . $mocc
5057
+ );
5058
+ $next_month_link = $is_this_month ? '<span style="float:right;" >&nbsp</span>' : '
5059
+ <span
5060
+ style="float:right;cursor:pointer;"
5061
+ title="' . ucfirst( $month_labels[$nm-1] ) . ' ' . $ny . '"
5062
+ onclick="wppaDoAjaxRender(' . $mocc . ', \'' . $ajaxurl . '\');"
5063
+ >&gt;</span>';
5064
+
5065
+ // Buid the html
5066
+ $result = '
5067
+ <div id="wppa-real-calendar" class="wppa-real-calendar" >
5068
+ <table class="wppa-real-calendar-table" style="width:100%;" >
5069
+ <thead class="wppa-real-calendar-head" >
5070
+ <tr class="wppa-real-calendar-caption" style="" >
5071
+ <td colspan="7" >' .
5072
+ $prev_month_link .
5073
+ ucfirst( $month_labels[$month - 1] ) . ' - ' . $year .
5074
+ $next_month_link . '
5075
+ </td>
5076
+ </tr>
5077
+ <tr class="wppa-real-calendar-days" >';
5078
+ foreach( $day_labels as $day_label ) {
5079
+ $result .= '
5080
+ <td class="wppa-real-calendar-day-label" >
5081
+ ' . ucfirst( $day_label ) . '
5082
+ </td>';
5083
+ }
5084
+ $result .= '
5085
+ </tr>
5086
+ </thead>
5087
+ <tbody class="wppa-real-calendar-body" >';
5088
+
5089
+ // Create weeks in a month
5090
+ for( $i = 0; $i < $num_of_weeks; $i++ ) {
5091
+
5092
+ $result .= '
5093
+ <tr class="wppa-real-calendar-week" >';
5094
+
5095
+ // Create days in a week
5096
+ for ( $j = 1; $j <= 7; $j++ ) {
5097
+ $cell_number = $i * 7 + $j;
5098
+
5099
+ // First day?
5100
+ if ( $cell_number == $first_day_of_the_week ) {
5101
+ $current_day = 1;
5102
+ }
5103
+
5104
+ // Existing day?
5105
+ if ( $current_day == 0 || $current_day > $days_in_month ) {
5106
+
5107
+ // Dummy day
5108
+ $result .= '
5109
+ <td
5110
+ class="wppa-real-calendar-dummy"
5111
+ >
5112
+ </td>';
5113
+ }
5114
+ else {
5115
+
5116
+ // Create the days html
5117
+ // See if tere are uploads this day
5118
+ if ( wppa( 'calendar' ) == 'realexifdtm' ) {
5119
+ $like = sprintf( '%d:%02d:%02d', $year, $month, $current_day );
5120
+ $query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
5121
+ WHERE exifdtm LIKE %s", $wpdb->esc_like( $like ) . '%' );
5122
+ }
5123
+ else {
5124
+ $from = wppa_local_strtotime( $year . '-' . $month . '-' . $current_day );
5125
+ $to = $from + 24 * 60 * 60;
5126
+ if ( wppa( 'calendar' ) == 'realmodified' ) {
5127
+ $query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
5128
+ WHERE modified >= %d
5129
+ AND modified < %d", $from, $to );
5130
+ }
5131
+ else {
5132
+ $query = $wpdb->prepare( "SELECT * FROM $wpdb->wppa_photos
5133
+ WHERE timestamp >= %d
5134
+ AND timestamp < %d", $from, $to );
5135
+ }
5136
+ }
5137
+
5138
+ if ( $albums ) {
5139
+ $query .= " AND album IN ($albums)";
5140
+ }
5141
+ else {
5142
+ $query .= " AND album > 0";
5143
+ }
5144
+ if ( ! current_user_can( 'wppa_moderate' ) ) {
5145
+ if ( is_user_logged_in() ) {
5146
+ $query .= " AND status <> 'pending'";
5147
+ }
5148
+ else {
5149
+ $query .= " AND status NOT IN ('pending','private')";
5150
+ }
5151
+ }
5152
+ $order = wppa_is_int( wppa( 'start_album' ) ) ? wppa_get_photo_order( wppa( 'start_album' ) ) : wppa_get_photo_order( '0' );
5153
+ $query .= " " . $order;
5154
+ wppa_log('obs', $query);
5155
+ $thumbs = $wpdb->get_results( $query, ARRAY_A );
5156
+ if ( count( $thumbs ) ) {
5157
+
5158
+ $imgtitle = sprintf( __( 'Zoom in to see %d items', 'wp-photo-album-plus' ), count( $thumbs ) );
5159
+ $cell_content = '';
5160
+ foreach ( $thumbs as $thumb ) {
5161
+ $id = $thumb['id'];
5162
+ $title = wppa_get_lbtitle( 'cover', $id );
5163
+ if ( wppa_is_video( $id ) ) {
5164
+ $siz['0'] = wppa_get_videox( $id );
5165
+ $siz['1'] = wppa_get_videoy( $id );
5166
+ }
5167
+ else {
5168
+ $siz['0'] = wppa_get_photox( $id );
5169
+ $siz['1'] = wppa_get_photoy( $id );
5170
+ }
5171
+ $link = wppa_get_photo_url( $id, true, '', $siz['0'], $siz['1'] );
5172
+ $is_video = wppa_is_video( $id );
5173
+ $has_audio = wppa_has_audio( $id );
5174
+ $is_pdf = wppa_is_pdf( $id );
5175
+
5176
+ // Open the anchor tag for lightbox
5177
+ $cell_content .= '
5178
+ <a
5179
+ data-id="' . wppa_encrypt_photo( $id ) . '"
5180
+ href="' . $link . '"
5181
+ style="border:0;color:transparent;"' .
5182
+ ( $is_video ? ' data-videohtml="' . esc_attr( wppa_get_video_body( $id ) ) . '"
5183
+ data-videonatwidth="' . wppa_get_videox( $id ) . '"
5184
+ data-videonatheight="' . wppa_get_videoy( $id ) . '"' : '' ) .
5185
+ ( $has_audio ? ' data-audiohtml="' . esc_attr( wppa_get_audio_body( $id ) ) . '"' : '' ) .
5186
+ ( $is_pdf ? ' data-pdfhtml="' . esc_attr( wppa_get_pdf_html( $id ) ) .'"' : '' ) .
5187
+ ' ' . wppa( 'rel' ) . '="' . wppa_opt( 'lightbox_name' ) . '[alw-' . wppa( 'mocc' ) . '-' . $year . '-' . $month . '-'. $cell_number . ']"' .
5188
+ ' ' . wppa( 'lbtitle' ) . '="' . $title . '"' .
5189
+ wppa_get_lb_panorama_full_html( $id ) . '
5190
+ data-alt="' . esc_attr( wppa_get_imgalt( $id, true ) ) . '"
5191
+ style="cursor:' . wppa_wait() . ';"
5192
+ onclick="return false;"
5193
+ >';
5194
+
5195
+ // the display image
5196
+ $imgattr = 'max-width:100%;max-height:100%;';
5197
+ if ( $id == $thumbs['0']['id'] ) {
5198
+ if ( wppa_is_video( $thumb['id'] ) ) {
5199
+ $cell_content .=
5200
+ '<video preload="metadata" class="thumb wppa-img" id="i-' . $thumb['id'] . '-' .
5201
+ wppa( 'mocc' ) . '" title="' . esc_attr( $imgtitle ) . '"
5202
+ style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '"
5203
+ >' .
5204
+ wppa_get_video_body( $thumb['id'] ) .
5205
+ '</video>'
5206
+ ;
5207
+ }
5208
+ else {
5209
+ $cell_content .=
5210
+ '<img
5211
+ class="thumb wppa-img"
5212
+ id="i-' . $thumb['id'] . '-' . wppa( 'mocc' ) . '"
5213
+ title="' . esc_attr( $imgtitle ) . '"
5214
+ src="' . wppa_get_thumb_url( $id ) . '"
5215
+ style="' . wppa_wcs( 'wppa-img' ) . $imgattr . '" ' .
5216
+ wppa_get_imgalt( $thumb['id'] ) . '
5217
+ />';
5218
+ }
5219
+ }
5220
+
5221
+ // Close the lightbox anchor tag
5222
+ $cell_content .=
5223
+ '</a>';
5224
+ }
5225
+ }
5226
+ else {
5227
+ $cell_content = $current_day;
5228
+ }
5229
+ $result .= '
5230
+ <td
5231
+ id="li-' . $current_day . '"
5232
+ class="wppa-real-calendar-day"
5233
+ >
5234
+ ' . $cell_content . '
5235
+ </td>';
5236
+
5237
+ $current_day++;
5238
+ }
5239
+ }
5240
+
5241
+ $result .= '
5242
+ </tr>';
5243
+ }
5244
+
5245
+ $result .= '
5246
+ </tbody>
5247
+ </table>
5248
+ </div>';
5249
+
5250
+ return $result;
5251
+ }
5252
+
5253
  // Stereo settings box
5254
  function wppa_stereo_box() {
5255
 
wppa-date-time.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
- * Version 7.2.06
7
  *
8
  */
9
 
@@ -214,6 +214,30 @@ function wppa_local_date( $format, $timestamp = false ) {
214
  return $result;
215
  }
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  function wppa_get_default_scheduledtm() {
218
 
219
  $result = wppa_local_date( 'Y,m,d,H,i' );
3
  * Package: wp-photo-album-plus
4
  *
5
  * date and time related functions
6
+ * Version 7.2.10
7
  *
8
  */
9
 
214
  return $result;
215
  }
216
 
217
+ // Return unix timestamp computed from readable date/time, corrected for timezone.
218
+ function wppa_local_strtotime( $str ) {
219
+
220
+ // Unix timestamp
221
+ $result = strtotime( $str );
222
+
223
+ // Find timezonestring
224
+ $tzstring = get_option( 'timezone_string' );
225
+
226
+ if ( $tzstring ) {
227
+ date_default_timezone_set( "UTC" );
228
+ $current_offset = timezone_offset_get( timezone_open( $tzstring ), new DateTime() );
229
+ }
230
+ else {
231
+
232
+ // Correct $time according to gmt_offset
233
+ $current_offset = get_option( 'gmt_offset', 0 ) * 3600;
234
+ }
235
+
236
+ $result -= $current_offset;
237
+ date_default_timezone_set( 'GMT' );
238
+ return $result;
239
+ }
240
+
241
  function wppa_get_default_scheduledtm() {
242
 
243
  $result = wppa_local_date( 'Y,m,d,H,i' );
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.2.09
7
  *
8
  */
9
 
@@ -300,12 +300,12 @@ global $wppa_revno;
300
  break;
301
  case 'calendar':
302
  if ( ! wppa_switch( 'allow_ajax' ) ) {
303
- wppa_dbg_msg ( 'Shortcode [wppa type="calendar" ... requires Ajax acive. See Photo Albums -> Settings Table IV-A1.0', 'red', 'force' );
304
  return '';
305
  }
306
  $wppa['is_calendar'] = true;
307
  $wppa['calendar'] = 'timestamp';
308
- if ( in_array( $atts['calendar'], array( 'exifdtm', 'timestamp', 'modified' ) ) ) {
309
  $wppa['calendar'] = $atts['calendar'];
310
  }
311
  if ( $atts['all'] ) {
3
  * Package: wp-photo-album-plus
4
  *
5
  * get the albums via shortcode handler
6
+ * Version 7.2.10
7
  *
8
  */
9
 
300
  break;
301
  case 'calendar':
302
  if ( ! wppa_switch( 'allow_ajax' ) ) {
303
+ wppa_dbg_msg ( 'Shortcode [wppa type="(real)calendar" ... requires Ajax acive. See Photo Albums -> Settings Table IV-A1.0', 'red', 'force' );
304
  return '';
305
  }
306
  $wppa['is_calendar'] = true;
307
  $wppa['calendar'] = 'timestamp';
308
+ if ( in_array( $atts['calendar'], array( 'exifdtm', 'timestamp', 'modified', 'realexifdtm', 'realtimestamp', 'realmodified' ) ) ) {
309
  $wppa['calendar'] = $atts['calendar'];
310
  }
311
  if ( $atts['all'] ) {
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 7.2.09
7
  *
8
  */
9
 
@@ -180,6 +180,14 @@ global $wppa_session;
180
  }
181
  }
182
  wppa( 'calendar', strip_tags( wppa_get_get( 'calendar' ) ) );
 
 
 
 
 
 
 
 
183
  wppa( 'caldate', strip_tags( wppa_get_get( 'caldate' ) ) );
184
  wppa( 'is_inverse', wppa_get_get( 'inv' ) );
185
 
@@ -830,7 +838,13 @@ global $wppa_session;
830
  }
831
  // Is it the calendar?
832
  elseif ( wppa( 'is_calendar' ) ) {
833
- wppa_calendar_box();
 
 
 
 
 
 
834
  }
835
  // The normal case
836
  else {
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 7.2.10
7
  *
8
  */
9
 
180
  }
181
  }
182
  wppa( 'calendar', strip_tags( wppa_get_get( 'calendar' ) ) );
183
+
184
+ // New style calendar and ajax: set is_calendar
185
+ if ( substr( wppa_get_get( 'calendar' ), 0, 4 ) == 'real' ) {
186
+ wppa( 'calendar', wppa_get_get( 'calendar' ) );
187
+ // }
188
+ // if ( wppa( 'calendar' ) == 'real' && wppa( 'ajax' ) ) {
189
+ wppa( 'is_calendar', true );
190
+ }
191
  wppa( 'caldate', strip_tags( wppa_get_get( 'caldate' ) ) );
192
  wppa( 'is_inverse', wppa_get_get( 'inv' ) );
193
 
838
  }
839
  // Is it the calendar?
840
  elseif ( wppa( 'is_calendar' ) ) {
841
+ // New style?
842
+ if ( substr( wppa( 'calendar' ), 0, 4 ) == 'real' ) {
843
+ wppa_real_calendar_box();
844
+ }
845
+ else {
846
+ wppa_calendar_box();
847
+ }
848
  }
849
  // The normal case
850
  else {
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.2.09
7
  *
8
  */
9
 
@@ -245,7 +245,7 @@ global $wpdb;
245
  ORDER BY timestamp DESC
246
  LIMIT %d, %d", $skip, $pagesize ), ARRAY_A );
247
 
248
- $count = is_array( $photos ) ? count( $photos ) : 0;
249
  $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
250
  }
251
 
3
  * Package: wp-photo-album-plus
4
  *
5
  * edit and delete photos
6
+ * Version 7.2.10
7
  *
8
  */
9
 
245
  ORDER BY timestamp DESC
246
  LIMIT %d, %d", $skip, $pagesize ), ARRAY_A );
247
 
248
+ $count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->wppa_photos" );
249
  $link = wppa_dbg_url( get_admin_url() . 'admin.php' . '?page=wppa_moderate_photos' . '&wppa_nonce=' . wp_create_nonce('wppa_nonce') );
250
  }
251
 
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.2.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/
@@ -23,7 +23,7 @@ global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '7210'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7.2.10.001'; // WPPA software version
27
 
28
  /* Init page js data */
29
  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.2.10.005
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
 
24
  /* WPPA GLOBALS */
25
  global $wppa_revno; $wppa_revno = '7210'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7.2.10.005'; // WPPA software version
27
 
28
  /* Init page js data */
29
  global $wppa_js_page_data; $wppa_js_page_data = '';