WP Photo Album Plus - Version 7.7.02.001

Version Description

= 7.7.02 =

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

Release Info

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

Code changes from version 7.7.01.010 to 7.7.02.001

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  WP Photo Album Plus Changelog
2
 
 
 
 
 
 
 
3
  = 7.7.01 =
4
 
5
  * New feature: On the album admin page (Edit album information) one can now overrule the following default settings for the items in the album:
1
  WP Photo Album Plus Changelog
2
 
3
+ = 7.7.02 =
4
+
5
+ * New setting: Table II-E10: Album id on cover. Places the album id in parenthesis near the album name on album covers. Selectable: 'none' (default), 'If user has editi access', 'Always'.
6
+ * On the Album Admin page you can now also enter an album id to edit it directly without the need to lopcate the album in the albumtable.
7
+
8
+ * New setting: Tanle
9
  = 7.7.01 =
10
 
11
  * New feature: On the album admin page (Edit album information) one can now overrule the following default settings for the items in the album:
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: 5.6
7
  Requires PHP: 5.5
8
- Stable tag: 7.6.10.003
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -134,7 +134,7 @@ See for the full changelog: <a href="http://www.wppa.nl/changelog/" >The documen
134
 
135
  == Upgrade Notice ==
136
 
137
- = 7.7.01 =
138
 
139
  * This version addresses various minor bug fixes and feature requests.
140
 
5
  Requires at least: 3.9
6
  Tested up to: 5.6
7
  Requires PHP: 5.5
8
+ Stable tag: 7.7.01.010
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
134
 
135
  == Upgrade Notice ==
136
 
137
+ = 7.7.02 =
138
 
139
  * This version addresses various minor bug fixes and feature requests.
140
 
wppa-album-admin-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
- * Version 7.7.01.005
7
  *
8
  */
9
 
@@ -85,13 +85,22 @@ global $wppa_revno;
85
 
86
  $ei = $_REQUEST['edit_id'];
87
  if ( $ei != 'new' && $ei != 'search' && $ei != 'trash' && $ei != 'single' && ! is_numeric( $ei ) ) {
88
- wppa_error_message( sprintf( __( 'Album edit id %s is not implemented', 'wp-photo-album-plus' ),
89
- '<b>' . sanitize_text_field( $ei ) . '</b>' ) );
90
  return;
91
  }
92
  if ( ! wp_verify_nonce( $_REQUEST['wppa_nonce'], 'wppa_nonce' ) ) {
93
  wp_die('Security check failure');
94
  }
 
 
 
 
 
 
 
 
 
 
95
  }
96
 
97
  if ( $_REQUEST['edit_id'] == 'single' ) {
@@ -1547,6 +1556,28 @@ global $wppa_revno;
1547
  echo
1548
  '</select>';
1549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1550
  ?>
1551
 
1552
  <br />
3
  * Package: wp-photo-album-plus
4
  *
5
  * create, edit and delete albums
6
+ * Version 7.7.02.001
7
  *
8
  */
9
 
85
 
86
  $ei = $_REQUEST['edit_id'];
87
  if ( $ei != 'new' && $ei != 'search' && $ei != 'trash' && $ei != 'single' && ! is_numeric( $ei ) ) {
88
+ wppa_error_message( sprintf( __( 'Album edit id %s is not implemented', 'wp-photo-album-plus' ), $ei ) );
 
89
  return;
90
  }
91
  if ( ! wp_verify_nonce( $_REQUEST['wppa_nonce'], 'wppa_nonce' ) ) {
92
  wp_die('Security check failure');
93
  }
94
+ if ( is_numeric( $ei ) ) {
95
+ if ( ! $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->wppa_albums WHERE id=%d", $ei ), ARRAY_A ) ) {
96
+ wppa_error_message( sprintf( __( 'Album %d does not exist', 'wp-photo-album-plus' ), $ei ) );
97
+ return;
98
+ }
99
+ if ( ! wppa_have_access( $ei ) ) {
100
+ wppa_error_message( sprintf( __( 'You do not have sufficient rights to edit Album %d', 'wp-photo-album-plus' ), $ei ) );
101
+ return;
102
+ }
103
+ }
104
  }
105
 
106
  if ( $_REQUEST['edit_id'] == 'single' ) {
1556
  echo
1557
  '</select>';
1558
 
1559
+ echo ' ' .
1560
+ __( 'Edit album number', 'wp-photo-album-plus' ) . ' ' . '
1561
+ <input
1562
+ id="wppa-edit-albid"
1563
+ type="number"
1564
+ min="1"
1565
+ />
1566
+ <input
1567
+ type="button"
1568
+ value="' . esc_attr( __( 'Go', 'wp-photo-album-plus' ) ) . '"
1569
+ onclick="wppaGoEditAlbNo();"
1570
+ />
1571
+ <script>
1572
+ function wppaGoEditAlbNo() {
1573
+ var id = document.getElementById("wppa-edit-albid").value;
1574
+ var nonce = "' . wp_create_nonce( 'wppa_nonce' ) .'";
1575
+ var href = "' . get_admin_url() . 'admin.php?page=wppa_admin_menu&wppa_nonce="+nonce+"&tab=edit&edit_id="+id;
1576
+ document.location.href=href;
1577
+ }
1578
+ </script>
1579
+ ';
1580
+
1581
  ?>
1582
 
1583
  <br />
wppa-album-covers.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
- * Version 7.6.05.001
7
  *
8
  */
9
 
@@ -1787,6 +1787,12 @@ function wppa_the_album_title( $alb, $href_title, $onclick_title, $title, $targe
1787
 
1788
  $album = wppa_cache_album( $alb );
1789
 
 
 
 
 
 
 
1790
  wppa_out(
1791
  '<h2 class="wppa-title" style="clear:none; ' . wppa_wcs( 'wppa-title' ) . '">'
1792
  );
@@ -1796,19 +1802,19 @@ function wppa_the_album_title( $alb, $href_title, $onclick_title, $title, $targe
1796
  wppa_out(
1797
  '<a onclick="' . $onclick_title . '" title="' . $title .
1798
  '" class="wppa-title" style="cursor:pointer; ' . wppa_wcs( 'wppa-title' ) . '">' .
1799
- wppa_get_album_name( $alb ) . '</a>'
1800
  );
1801
  }
1802
  else {
1803
  wppa_out(
1804
  '<a href="' . $href_title . '" target="' . $target . '" onclick="' . $onclick_title .
1805
  '" title="' . $title . '" class="wppa-title" style="' . wppa_wcs( 'wppa-title' ) . '">' .
1806
- wppa_get_album_name( $alb ) . '</a>'
1807
  );
1808
  }
1809
  }
1810
  else {
1811
- wppa_out( wppa_get_album_name( $alb ) );
1812
  }
1813
 
1814
  // Photo count?
3
  * Package: wp-photo-album-plus
4
  *
5
  * Functions for album covers
6
+ * Version 7.7.02.001
7
  *
8
  */
9
 
1787
 
1788
  $album = wppa_cache_album( $alb );
1789
 
1790
+ $album_title = wppa_get_album_name( $alb );
1791
+ if ( wppa_opt( 'albumid_on_cover' ) == 'all' ||
1792
+ ( wppa_opt( 'albumid_on_cover' ) == 'access' && wppa_have_access( $alb ) ) ) {
1793
+ $album_title .= ' <span style="font-size:0.7em;font-weight:normal;" >(' . $alb . ')</span>';
1794
+ }
1795
+
1796
  wppa_out(
1797
  '<h2 class="wppa-title" style="clear:none; ' . wppa_wcs( 'wppa-title' ) . '">'
1798
  );
1802
  wppa_out(
1803
  '<a onclick="' . $onclick_title . '" title="' . $title .
1804
  '" class="wppa-title" style="cursor:pointer; ' . wppa_wcs( 'wppa-title' ) . '">' .
1805
+ $album_title . '</a>'
1806
  );
1807
  }
1808
  else {
1809
  wppa_out(
1810
  '<a href="' . $href_title . '" target="' . $target . '" onclick="' . $onclick_title .
1811
  '" title="' . $title . '" class="wppa-title" style="' . wppa_wcs( 'wppa-title' ) . '">' .
1812
+ $album_title . '</a>'
1813
  );
1814
  }
1815
  }
1816
  else {
1817
+ wppa_out( $album_title );
1818
  }
1819
 
1820
  // Photo count?
wppa-defaults.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
- * Version 7.7.01.010
7
  *
8
  */
9
 
@@ -292,6 +292,7 @@ horizrailenabled:false,";
292
  'wppa_skip_empty_albums' => 'yes',
293
  'wppa_count_on_title' => '-none-',
294
  'wppa_viewcount_on_cover' => '-none-',
 
295
 
296
 
297
  // E Widgets
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains default settings
6
+ * Version 7.7.02.001
7
  *
8
  */
9
 
292
  'wppa_skip_empty_albums' => 'yes',
293
  'wppa_count_on_title' => '-none-',
294
  'wppa_viewcount_on_cover' => '-none-',
295
+ 'wppa_albumid_on_cover' => '-none-',
296
 
297
 
298
  // E Widgets
wppa-settings-autosave.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
- * Version 7.7.01.010
7
  *
8
  */
9
 
@@ -2833,6 +2833,17 @@ global $wppa_supported_camara_brands;
2833
  $tags = 'cover,album,layout';
2834
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
2835
 
 
 
 
 
 
 
 
 
 
 
 
2836
  }
2837
  wppa_setting_subheader( 'F', '1', __( 'Widget related visibility settings' , 'wp-photo-album-plus') );
2838
  {
@@ -7293,8 +7304,15 @@ global $wppa_supported_camara_brands;
7293
 
7294
  <div id="wppa_table_7" style="display:none" >
7295
  <table class="widefat wppa-table wppa-setting-table" style="padding-bottom:0; margin-bottom:0;" >
7296
- <thead style="font-weight: bold; " class="wppa_table_7">
7297
- <tr>
 
 
 
 
 
 
 
7298
  <?php
7299
  $wppacaps = array( 'wppa_admin',
7300
  'wppa_upload',
@@ -7333,13 +7351,8 @@ global $wppa_supported_camara_brands;
7333
  for ($i = 0; $i < count($wppacaps); $i++) echo '<td style="width:11%;cursor:pointer;" title="'.($titles[$i]).'" >'.$wppanames[$i].'</td>';
7334
  ?>
7335
  </tr>
7336
- </thead>
7337
- <tbody class="wppa_table_7">
7338
- <?php
7339
- $wppa_table = 'VII';
7340
-
7341
- wppa_setting_subheader('A', '7', __('Admin settings per user role. These settings define the display of the Photo Albums sub-menu items.', 'wp-photo-album-plus'), '', false );
7342
 
 
7343
  $tags = 'access,system';
7344
  $roles = $wp_roles->roles;
7345
  $opts = array( '',
3
  * Package: wp-photo-album-plus
4
  *
5
  * manage all options
6
+ * Version 7.7.02.001
7
  *
8
  */
9
 
2833
  $tags = 'cover,album,layout';
2834
  wppa_setting($slug, '9', $name, $desc, $html, $help, $clas, $tags);
2835
 
2836
+ $name = __('Album id on cover', 'wp-photo-album-plus');
2837
+ $desc = __('Show album id on album cover next to name', 'wp-photo-album-plus');
2838
+ $help = '';
2839
+ $slug = 'wppa_albumid_on_cover';
2840
+ $opts = array( __('none', 'wp-photo-album-plus'), __('If user has edit access', 'wp-photo-album-plus'), __('Always', 'wp-photo-album-plus') );
2841
+ $vals = array( '-none-', 'access', 'all' );
2842
+ $html = wppa_select($slug, $opts, $vals);
2843
+ $clas = '';
2844
+ $tags = 'cover,album,layout';
2845
+ wppa_setting($slug, '10', $name, $desc, $html, $help, $clas, $tags);
2846
+
2847
  }
2848
  wppa_setting_subheader( 'F', '1', __( 'Widget related visibility settings' , 'wp-photo-album-plus') );
2849
  {
7304
 
7305
  <div id="wppa_table_7" style="display:none" >
7306
  <table class="widefat wppa-table wppa-setting-table" style="padding-bottom:0; margin-bottom:0;" >
7307
+
7308
+ <tbody class="wppa_table_7">
7309
+ <?php
7310
+ $wppa_table = 'VII';
7311
+
7312
+ wppa_setting_subheader('A', '7', __('Admin settings per user role. These settings define the display of the Photo Albums sub-menu items.', 'wp-photo-album-plus'), '', false );
7313
+ ?>
7314
+
7315
+ <tr style="font-weight: bold; " class="wppa-VII-A">
7316
  <?php
7317
  $wppacaps = array( 'wppa_admin',
7318
  'wppa_upload',
7351
  for ($i = 0; $i < count($wppacaps); $i++) echo '<td style="width:11%;cursor:pointer;" title="'.($titles[$i]).'" >'.$wppanames[$i].'</td>';
7352
  ?>
7353
  </tr>
 
 
 
 
 
 
7354
 
7355
+ <?php
7356
  $tags = 'access,system';
7357
  $roles = $wp_roles->roles;
7358
  $opts = array( '',
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.7.01.010
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_revno; $wppa_revno = '7701'; // WPPA db version
27
- global $wppa_api_version; $wppa_api_version = '7.7.01.010'; // WPPA software version
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.7.02.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_revno; $wppa_revno = '7701'; // WPPA db version
27
+ global $wppa_api_version; $wppa_api_version = '7.7.02.001'; // WPPA software version
28
 
29
  /* Init page js data */
30
  global $wppa_js_page_data; $wppa_js_page_data = '';