WP Photo Album Plus - Version 7.0.00.006

Version Description

= 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. Use the WPPA+ Notify widget.

= 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.0.00.006
Comparing to
See all releases

Code changes from version 7.0.00.005 to 7.0.00.006

wppa-ajax.php CHANGED
@@ -70,7 +70,10 @@ global $wppa_log_file;
70
  }
71
 
72
  // Existing list type?
73
- if ( ! in_array( $list_type, array( 'newalbum', 'photoapproved' ) ) ) {
 
 
 
74
  _e( 'Requested mailinglist does not exist', 'wp-photo-album-plus' );
75
  wppa_exit();
76
  }
@@ -82,8 +85,9 @@ global $wppa_log_file;
82
  }
83
 
84
  // Prepare additional data
85
- $list_type_text = array( 'newalbum' => __( 'new albums', 'wp-photo-album-plus' ),
86
- 'photoapproved' => __( 'photo approved', 'wp-photo-album-plus'),
 
87
  );
88
  $mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
89
  $userarray = wppa_index_string_to_array( $mailinglist );
@@ -92,6 +96,7 @@ global $wppa_log_file;
92
  switch( $list_type ) {
93
  case 'newalbum':
94
  case 'photoapproved':
 
95
 
96
  if ( $onoff == 'on' ) {
97
  $userarray[] = wppa_get_user( 'id' );
70
  }
71
 
72
  // Existing list type?
73
+ if ( ! in_array( $list_type, array( 'newalbum',
74
+ 'photoapproved',
75
+ 'commentapproved',
76
+ ) ) ) {
77
  _e( 'Requested mailinglist does not exist', 'wp-photo-album-plus' );
78
  wppa_exit();
79
  }
85
  }
86
 
87
  // Prepare additional data
88
+ $list_type_text = array( 'newalbum' => __( 'new albums', 'wp-photo-album-plus' ),
89
+ 'photoapproved' => __( 'photo approved', 'wp-photo-album-plus'),
90
+ 'commentapproved' => __( 'comment approved', 'wp-photo-album-plus'),
91
  );
92
  $mailinglist = get_option( 'wppa_mailinglist_' . $list_type, '' );
93
  $userarray = wppa_index_string_to_array( $mailinglist );
96
  switch( $list_type ) {
97
  case 'newalbum':
98
  case 'photoapproved':
99
+ case 'commentapproved':
100
 
101
  if ( $onoff == 'on' ) {
102
  $userarray[] = wppa_get_user( 'id' );
wppa-gutenberg-photo.php CHANGED
@@ -12,6 +12,11 @@ function wppa_gutenberg_photo_block() {
12
  return;
13
  }
14
 
 
 
 
 
 
15
  wp_register_script(
16
  'wppa-gutenberg-photo',
17
  plugins_url( 'js/wppa-gutenberg-photo.js', __FILE__ ),
12
  return;
13
  }
14
 
15
+ // Photo shortcode enabled?
16
+ if ( ! wppa_switch( 'photo_shortcode_enabled' ) ) {
17
+ return;
18
+ }
19
+
20
  wp_register_script(
21
  'wppa-gutenberg-photo',
22
  plugins_url( 'js/wppa-gutenberg-photo.js', __FILE__ ),
wppa-notify-widget.php CHANGED
@@ -23,6 +23,7 @@ class wppaNotifyWidget extends WP_Widget {
23
  'newalbum' => 'no',
24
  'newalbumlink' => '',
25
  'photoapproved' => 'no',
 
26
  'logonly' => 'yes',
27
  ) );
28
  // Logged in only and logged out?
@@ -53,7 +54,6 @@ class wppaNotifyWidget extends WP_Widget {
53
  __( 'A new album is created', 'wp-photo-album-plus' ) . '
54
  </label>
55
  <br />';
56
-
57
  }
58
 
59
  // Photo approved
@@ -61,7 +61,7 @@ class wppaNotifyWidget extends WP_Widget {
61
  $in_list = wppa_am_i_in_mailinglist( 'photoapproved' );
62
  $widget_content .= '
63
  <input
64
- id="wppa-newalbum-notify"
65
  type="checkbox"
66
  style="float:left;" ' .
67
  ( $in_list ? 'checked="checked" ' : ' ' ) .
@@ -74,9 +74,29 @@ class wppaNotifyWidget extends WP_Widget {
74
  __( 'My photo is approved', 'wp-photo-album-plus' ) . '
75
  </label>
76
  <br />';
 
77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
 
 
80
  $widget_content .= '<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />';
81
  $widget_content .= '<div style="clear:both" ></div>';
82
  $widget_content .= "\n".'<!-- WPPA+ notify Widget end -->';
@@ -98,6 +118,7 @@ class wppaNotifyWidget extends WP_Widget {
98
  'newalbum' => 'no',
99
  'newalbumlink' => '',
100
  'photoapproved' => 'no',
 
101
  'logonly' => 'yes',
102
  ) );
103
 
@@ -119,6 +140,7 @@ class wppaNotifyWidget extends WP_Widget {
119
  'newalbum' => 'no',
120
  'newalbumlink' => '',
121
  'photoapproved' => 'no',
 
122
  'logonly' => 'yes',
123
  ) );
124
 
@@ -130,7 +152,7 @@ class wppaNotifyWidget extends WP_Widget {
130
  echo
131
  wppa_widget_checkbox( $this,
132
  'newalbum',
133
- wppa_switch( 'wppa_mail_new_album' ) ? 'yes' : 'no',
134
  __( 'New album created', 'wp-photo-album-plus'),
135
  __( 'See Table IX-D19 and 20: Mail on new album', 'wp-photo-album-plus'),
136
  'disabled' );
@@ -144,7 +166,14 @@ class wppaNotifyWidget extends WP_Widget {
144
  __( 'See Table VII-B7.2: Notify approve photo', 'wp-photo-album-plus' ),
145
  'disabled' );
146
 
147
- //
 
 
 
 
 
 
 
148
 
149
 
150
  // Loggedin only
23
  'newalbum' => 'no',
24
  'newalbumlink' => '',
25
  'photoapproved' => 'no',
26
+ 'commentapproved' => 'no',
27
  'logonly' => 'yes',
28
  ) );
29
  // Logged in only and logged out?
54
  __( 'A new album is created', 'wp-photo-album-plus' ) . '
55
  </label>
56
  <br />';
 
57
  }
58
 
59
  // Photo approved
61
  $in_list = wppa_am_i_in_mailinglist( 'photoapproved' );
62
  $widget_content .= '
63
  <input
64
+ id="wppa-photoapproved-notify"
65
  type="checkbox"
66
  style="float:left;" ' .
67
  ( $in_list ? 'checked="checked" ' : ' ' ) .
74
  __( 'My photo is approved', 'wp-photo-album-plus' ) . '
75
  </label>
76
  <br />';
77
+ }
78
 
79
+ // Comment approved (to photo owner)
80
+ if ( wppa_switch( 'com_notify_approved' ) ) {
81
+ $in_list = wppa_am_i_in_mailinglist( 'commentapproved' );
82
+ $widget_content .= '
83
+ <input
84
+ id="wppa-commentapproved-notify"
85
+ type="checkbox"
86
+ style="float:left;" ' .
87
+ ( $in_list ? 'checked="checked" ' : ' ' ) .
88
+ 'onchange="wppaAjaxNotify(this,\'commentapproved\');"
89
+ />
90
+ <label
91
+ for="wppa-newalbum-notify"
92
+ style="float:left;padding-left:4px;"
93
+ > ' .
94
+ __( 'Comment on my photo is approved', 'wp-photo-album-plus' ) . '
95
+ </label>
96
+ <br />';
97
  }
98
 
99
+
100
  $widget_content .= '<input type="hidden" id="wppa-ntfy-nonce" value="' . wp_create_nonce( 'wppa-ntfy-nonce' ) . '" />';
101
  $widget_content .= '<div style="clear:both" ></div>';
102
  $widget_content .= "\n".'<!-- WPPA+ notify Widget end -->';
118
  'newalbum' => 'no',
119
  'newalbumlink' => '',
120
  'photoapproved' => 'no',
121
+ 'commentapproved' => 'no',
122
  'logonly' => 'yes',
123
  ) );
124
 
140
  'newalbum' => 'no',
141
  'newalbumlink' => '',
142
  'photoapproved' => 'no',
143
+ 'commentapproved' => 'no',
144
  'logonly' => 'yes',
145
  ) );
146
 
152
  echo
153
  wppa_widget_checkbox( $this,
154
  'newalbum',
155
+ wppa_switch( 'mail_new_album' ) ? 'yes' : 'no',
156
  __( 'New album created', 'wp-photo-album-plus'),
157
  __( 'See Table IX-D19 and 20: Mail on new album', 'wp-photo-album-plus'),
158
  'disabled' );
166
  __( 'See Table VII-B7.2: Notify approve photo', 'wp-photo-album-plus' ),
167
  'disabled' );
168
 
169
+ // Notify when comment on photo approved
170
+ echo
171
+ wppa_widget_checkbox( $this,
172
+ 'commentapproved',
173
+ wppa_switch( 'com_notify_approved' ) ? 'yes' : 'no',
174
+ __( 'Comment on photo approved', 'wp-photo-album-plus' ),
175
+ __( 'See Table IV-F5.2 and 5.3: Comment notify approved', 'wp-photo-album-plus' ),
176
+ 'disabled' );
177
 
178
 
179
  // Loggedin only
wppa-settings-autosave.php CHANGED
@@ -8531,6 +8531,15 @@ var_dump ( json_decode( json_encode( unserialize( $session['data'] ) )));
8531
  $tags = 'system';
8532
  wppa_setting($slug, '9.5', $name, $desc, $html, $help, $clas, $tags);
8533
 
 
 
 
 
 
 
 
 
 
8534
  $name = __('Retry failed mails', 'wp-photo-album-plus');
8535
  $desc = __('Select number of retries for failed mails', 'wp-photo-album-plus');
8536
  $help = esc_js(__('Retries occur at the background every hour', 'wp-photo-album-plus'));
8531
  $tags = 'system';
8532
  wppa_setting($slug, '9.5', $name, $desc, $html, $help, $clas, $tags);
8533
 
8534
+ $name = __('Log Emails sent', 'wp-photo-album-plus');
8535
+ $desc = __('Keep track of sending emails.', 'wp-photo-album-plus');
8536
+ $help = '';
8537
+ $slug = 'wppa_log_email';
8538
+ $html = wppa_checkbox($slug);
8539
+ $clas = '';
8540
+ $tags = 'system,mail';
8541
+ wppa_setting($slug, '9.6', $name, $desc, $html, $help, $clas, $tags);
8542
+
8543
  $name = __('Retry failed mails', 'wp-photo-album-plus');
8544
  $desc = __('Select number of retries for failed mails', 'wp-photo-album-plus');
8545
  $help = esc_js(__('Retries occur at the background every hour', 'wp-photo-album-plus'));
wppa-setup.php CHANGED
@@ -1677,6 +1677,7 @@ cursorborder:'2px solid transparent',";
1677
  'wppa_log_comments' => 'no', // A9.3
1678
  'wppa_log_fso' => 'no', // A9.4
1679
  'wppa_log_debug' => 'no', // A9.5
 
1680
  'wppa_moderate_bulk' => 'no', // B20
1681
  'wppa_retry_mails' => '0', // A10
1682
  'wppa_minimum_tags' => '', // A11
1677
  'wppa_log_comments' => 'no', // A9.3
1678
  'wppa_log_fso' => 'no', // A9.4
1679
  'wppa_log_debug' => 'no', // A9.5
1680
+ 'wppa_log_email' => 'no',
1681
  'wppa_moderate_bulk' => 'no', // B20
1682
  'wppa_retry_mails' => '0', // A10
1683
  'wppa_minimum_tags' => '', // A11
wppa-utils.php CHANGED
@@ -985,7 +985,9 @@ global $wpdb;
985
  '<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius 4px;" ><em> '.stripslashes($com['comment']).'</em></blockquote>';
986
 
987
  // Send mail
988
- wppa_send_mail( $user->user_email, __( 'Approved comment on photo', 'wp-photo-album-plus' ), $content, $com['photo'], 'void' );
 
 
989
 
990
  }
991
 
@@ -1059,7 +1061,10 @@ function wppa_send_mail( $to, $subj, $cont, $photo = '0', $email = '' ) {
1059
  $message_part_1 . $message_part_2 . $message_part_3,
1060
  $headers,
1061
  '' );
1062
- if ( $iret ) return;
 
 
 
1063
 
1064
  wppa_log( 'Err', 'Mail sending failed. to=' . $to . ', subject=' . $subject . ', message=' . $message_part_1 . $message_part_2 . $message_part_3 );
1065
 
@@ -1674,7 +1679,17 @@ global $wppa_log_file;
1674
  $type = '{span style="color:gray;" }Dbg{/span}';
1675
  break;
1676
  case 'e':
1677
- $type = '{span style="color:red;" }Err{/span}';
 
 
 
 
 
 
 
 
 
 
1678
  break;
1679
  case 'f':
1680
  switch ( $u ) {
985
  '<blockquote style="color:#000077; background-color: #dddddd; border:1px solid black; padding: 6px; border-radius 4px;" ><em> '.stripslashes($com['comment']).'</em></blockquote>';
986
 
987
  // Send mail
988
+ if ( wppa_is_user_in_mailinglist( $owner, 'commentapproved' ) ) {
989
+ wppa_send_mail( $user->user_email, __( 'Approved comment on photo', 'wp-photo-album-plus' ), $content, $com['photo'], 'void' );
990
+ }
991
 
992
  }
993
 
1061
  $message_part_1 . $message_part_2 . $message_part_3,
1062
  $headers,
1063
  '' );
1064
+ if ( $iret ) {
1065
+ wppa_log( 'eml', 'Mail send to: ' . $to . ', subject: ' . $subject . ', photo: ' . ( $photo ? $photo : 'not supplied.' ) );
1066
+ return;
1067
+ }
1068
 
1069
  wppa_log( 'Err', 'Mail sending failed. to=' . $to . ', subject=' . $subject . ', message=' . $message_part_1 . $message_part_2 . $message_part_3 );
1070
 
1679
  $type = '{span style="color:gray;" }Dbg{/span}';
1680
  break;
1681
  case 'e':
1682
+ switch( $u ) {
1683
+ case 'r':
1684
+ $type = '{span style="color:red;" }Err{/span}';
1685
+ break;
1686
+ case 'm':
1687
+ if ( get_option( 'wppa_log_email' ) == 'no' ) {
1688
+ return;
1689
+ }
1690
+ $type = '{span style="color:blue;" }Eml{/span}';
1691
+ break;
1692
+ }
1693
  break;
1694
  case 'f':
1695
  switch ( $u ) {
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.0.00
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 = '7000'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '7-0-00-005'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );
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.0.00.006
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 = '7000'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '7-0-00-006'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );