WP Photo Album Plus - Version 6.7.05

Version Description

Download this release

Release Info

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

Code changes from version 6.7.04 to 6.7.05

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&currency_code=USD&lc=US
4
  Tags: photo, album, slideshow, video, audio, lightbox, iptc, exif, cloudinary, fotomoto, imagemagick, pdf
5
- Version: 6.7.04
6
- Stable tag: 6.7.03
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
@@ -112,11 +112,7 @@ If this happens, make sure (ask your hosting provider) that you have all the rig
112
 
113
  = How does the search widget work? =
114
 
115
- * A space between words means AND, a comma between words means OR.
116
- Example: search for 'one two, three four, five' gives a result when either 'one' AND 'two' appears in the same (combination of) name and description.
117
- If it matches the name and description of an album, you get the album, and/or the photo.
118
- OR this might apply for ('three' AND 'four') OR 'five'.
119
- The tokens must be at least 3 characters in length.
120
 
121
  = How can i translate the plugin into my language? =
122
 
@@ -131,6 +127,16 @@ The tokens must be at least 3 characters in length.
131
 
132
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
133
 
 
 
 
 
 
 
 
 
 
 
134
  = 6.7.04 =
135
 
136
  = Bug Fixes =
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: 6.7.05
6
+ Stable tag: 6.7.04
7
  Author: J.N. Breetvelt
8
  Author URI: http://www.opajaap.nl/
9
  Requires at least: 3.9
112
 
113
  = How does the search widget work? =
114
 
115
+ * See the documentation on the WPPA+ Docs & Demos site: https://wppa.nl/docs-by-subject/search/regular-search/
 
 
 
 
116
 
117
  = How can i translate the plugin into my language? =
118
 
127
 
128
  See for additional information: <a href="http://www.wppa.nl/changelog/" >The documentation website</a>
129
 
130
+ = 6.7.05 =
131
+
132
+ = Bug Fixes =
133
+
134
+ * Album selectionboxes on the album admin page have alphabetically sorted content again.
135
+
136
+ = New Features =
137
+
138
+ * Negate option in search. Enter token1 !token2 to get all albums/photos that match token1 but do not match token2.
139
+
140
  = 6.7.04 =
141
 
142
  = Bug Fixes =
wppa-album-admin-autosave.php CHANGED
@@ -456,7 +456,8 @@ function wppaTryScheduleAll( id ) {
456
  'addnone' => true,
457
  'addseparate' => true,
458
  'disableancestors' => true,
459
- 'path' => wppa_switch( 'hier_albsel' )
 
460
  )
461
  ) .
462
  '</select>';
@@ -473,7 +474,8 @@ function wppaTryScheduleAll( id ) {
473
  'selected' => $a_parent,
474
  'addselected' => true,
475
  'disableancestors' => true,
476
- 'path' => wppa_switch( 'hier_albsel' )
 
477
  )
478
  ) .
479
  '</select>';
@@ -1208,7 +1210,14 @@ function wppaTryScheduleAll( id ) {
1208
  <input type="radio" name="wppa-del-photos" value="delete" checked="checked" /> <?php _e('Delete', 'wp-photo-album-plus'); ?><br />
1209
  <input type="radio" name="wppa-del-photos" value="move" /> <?php _e('Move to:', 'wp-photo-album-plus'); ?>
1210
  <select name="wppa-move-album">
1211
- <?php echo wppa_album_select_a(array('checkaccess' => true, 'path' => wppa_switch( 'hier_albsel'), 'selected' => '0', 'exclude' => $_REQUEST['edit_id'], 'addpleaseselect' => true)) ?>
 
 
 
 
 
 
 
1212
  </select>
1213
  </p>
1214
 
456
  'addnone' => true,
457
  'addseparate' => true,
458
  'disableancestors' => true,
459
+ 'path' => wppa_switch( 'hier_albsel' ),
460
+ 'sort' => true,
461
  )
462
  ) .
463
  '</select>';
474
  'selected' => $a_parent,
475
  'addselected' => true,
476
  'disableancestors' => true,
477
+ 'path' => wppa_switch( 'hier_albsel' ),
478
+ 'sort' => true,
479
  )
480
  ) .
481
  '</select>';
1210
  <input type="radio" name="wppa-del-photos" value="delete" checked="checked" /> <?php _e('Delete', 'wp-photo-album-plus'); ?><br />
1211
  <input type="radio" name="wppa-del-photos" value="move" /> <?php _e('Move to:', 'wp-photo-album-plus'); ?>
1212
  <select name="wppa-move-album">
1213
+ <?php echo wppa_album_select_a( array( 'checkaccess' => true,
1214
+ 'path' => wppa_switch( 'hier_albsel'),
1215
+ 'selected' => '0',
1216
+ 'exclude' => $_REQUEST['edit_id'],
1217
+ 'addpleaseselect' => true,
1218
+ 'sort' => true,
1219
+ ) )
1220
+ ?>
1221
  </select>
1222
  </p>
1223
 
wppa-common-functions.php CHANGED
@@ -2,7 +2,7 @@
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
- * Version 6.7.03
6
  *
7
  */
8
 
@@ -795,16 +795,21 @@ global $wppa;
795
  }
796
 
797
  // Selection boxes present and with a value?
 
798
  for ( $i = 0; $i < 3; $i++ ) {
799
  if ( isset( $_REQUEST['wppa-searchselbox-' . $i] ) ) {
800
  if ( $_REQUEST['wppa-searchselbox-' . $i] ) {
801
- $str .= ' ' . $_REQUEST['wppa-searchselbox-' . $i];
802
  }
803
  }
804
  }
 
 
 
 
805
 
806
  // Sanitize
807
- $ignore = array( '"', "'", '\\', '>', '<', ':', ';', '!', '?', '=', '_', '[', ']', '(', ')', '{', '}' );
808
  $str = wppa_decode_uri_component( $str );
809
  $str = str_replace( $ignore, ' ', $str );
810
  $str = strip_tags( $str );
2
  /* wppa-common-functions.php
3
  *
4
  * Functions used in admin and in themes
5
+ * Version 6.7.05
6
  *
7
  */
8
 
795
  }
796
 
797
  // Selection boxes present and with a value?
798
+ $t = '';
799
  for ( $i = 0; $i < 3; $i++ ) {
800
  if ( isset( $_REQUEST['wppa-searchselbox-' . $i] ) ) {
801
  if ( $_REQUEST['wppa-searchselbox-' . $i] ) {
802
+ $t .= ' ' . $_REQUEST['wppa-searchselbox-' . $i];
803
  }
804
  }
805
  }
806
+ if ( $t ) {
807
+ $str = $t . ' ' . $str;
808
+ $str = trim( $str );
809
+ }
810
 
811
  // Sanitize
812
+ $ignore = array( '"', "'", '\\', '>', '<', ':', ';', '?', '=', '_', '[', ']', '(', ')', '{', '}' );
813
  $str = wppa_decode_uri_component( $str );
814
  $str = str_replace( $ignore, ' ', $str );
815
  $str = strip_tags( $str );
wppa-functions.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
- * Version 6.7.03
7
  *
8
  */
9
 
@@ -994,41 +994,11 @@ global $wppa_session;
994
 
995
  // Search?
996
  elseif ( wppa( 'src' ) ) {
997
- $final_array = array();
998
- $chunks = explode( ',', stripslashes( strtolower( wppa( 'searchstring' ) ) ) );
999
- // all chunks
1000
- foreach ( $chunks as $chunk ) if ( strlen( trim( $chunk ) ) ) {
1001
- $words = wppa_index_raw_to_words( $chunk );
1002
- $album_array = array();
1003
- // all words in the searchstring
1004
- foreach ( $words as $word ) {
1005
- $word = trim( $word );
1006
- if ( strlen( $word ) > 1 ) {
1007
- if ( strlen( $word ) > 10 ) $word = substr( $word, 0, 10 );
1008
- if ( wppa_switch( 'wild_front' ) ) {
1009
- $aidxs = $wpdb->get_results( "SELECT `slug`, `albums` FROM `".WPPA_INDEX."` WHERE `slug` LIKE '%".$word."%'", ARRAY_A );
1010
- }
1011
- else {
1012
- $aidxs = $wpdb->get_results( "SELECT `slug`, `albums` FROM `".WPPA_INDEX."` WHERE `slug` LIKE '".$word."%'", ARRAY_A );
1013
- }
1014
- $albums = '';
1015
- if ( $aidxs ) {
1016
- foreach ( $aidxs as $ai ) {
1017
- $albums .= $ai['albums'].',';
1018
- }
1019
- }
1020
- $album_array[] = wppa_index_string_to_array( trim( $albums, ',' ) );
1021
- }
1022
- }
1023
- // Must meet all words: intersect photo sets
1024
- foreach ( array_keys( $album_array ) as $idx ) {
1025
- if ( $idx > '0' ) {
1026
- $album_array['0'] = array_intersect( $album_array['0'], $album_array[$idx] );
1027
- }
1028
- }
1029
- // Save partial result
1030
- if ( isset( $album_array['0'] ) ) $final_array = array_merge( $final_array, $album_array['0'] );
1031
- }
1032
 
1033
  // If Catbox specifies a category to limit, remove all albums that do not have the desired cat.
1034
  if ( wppa( 'catbox' ) ) {
@@ -1595,67 +1565,22 @@ global $wppa_session;
1595
  if ( ! empty ( $wppa_session['use_searchstring'] ) ) $searchstring = $wppa_session['use_searchstring'];
1596
 
1597
  $final_array = array();
1598
- $chunks = explode( ',', stripslashes( strtolower( $searchstring ) ) );
1599
-
1600
- // all chunks
1601
- foreach ( $chunks as $chunk ) if ( strlen( trim( $chunk ) ) ) {
1602
- $words = wppa_index_raw_to_words( $chunk, false, wppa_opt( 'search_min_length' ) );
1603
- $photo_array = array();
1604
- // all words in the searchstring
1605
- foreach ( $words as $word ) {
1606
- $word = trim( $word );
1607
- if ( strlen( $word ) >= wppa_opt( 'search_min_length' ) ) {
1608
- if ( strlen( $word ) > 20 ) $word = substr( $word, 0, 20 );
1609
- if ( wppa_switch( 'wild_front' ) ) {
1610
- $pidxs = $wpdb->get_results( "SELECT `slug`, `photos` FROM `".WPPA_INDEX."` WHERE `slug` LIKE '%".$word."%'", ARRAY_A );
1611
- }
1612
- else {
1613
- $pidxs = $wpdb->get_results( "SELECT `slug`, `photos` FROM `".WPPA_INDEX."` WHERE `slug` LIKE '".$word."%'", ARRAY_A );
1614
- }
1615
- $photos = '';
1616
- if ( $pidxs ) {
1617
- foreach ( $pidxs as $pi ) {
1618
- $photos .= $pi['photos'].',';
1619
- }
1620
- }
1621
- $photo_array[] = wppa_index_string_to_array( trim( $photos, ',' ) );
1622
- }
1623
- }
1624
- // Must meet all words: intersect photo sets
1625
- foreach ( array_keys( $photo_array ) as $idx ) {
1626
- if ( $idx > '0' ) {
1627
- $photo_array['0'] = array_intersect( $photo_array['0'], $photo_array[$idx] );
1628
- }
1629
- }
1630
- // Save partial result
1631
- if ( isset( $photo_array['0'] ) ) $final_array = array_merge( $final_array, $photo_array['0'] );
1632
-
1633
- // Remove dups
1634
- $final_array = array_unique( $final_array );
1635
- }
1636
 
1637
  // Remove scheduled and pending and trashed when not can moderate
1638
  if ( ! current_user_can( 'wppa_moderate' ) ) {
1639
- $needmod = $wpdb->get_results( "SELECT `id` FROM `".WPPA_PHOTOS."` WHERE `status` = 'scheduled' OR `status` = 'pending' OR `album` <= '-9'", ARRAY_A );
1640
  if ( is_array( $needmod ) ) {
1641
- $delta = array();
1642
- foreach ( $needmod as $item ) {
1643
- $delta[] = $item['id'];
1644
- }
1645
  }
1646
- $final_array = array_diff( $final_array, $delta );
1647
  }
1648
 
1649
  // Remove private and trashed when not logged in
1650
  if ( ! is_user_logged_in() ) {
1651
- $needlogin = $wpdb->get_results( "SELECT `id` FROM `".WPPA_PHOTOS."` WHERE `status` = 'private' OR `album` <= '-9'", ARRAY_A );
1652
  if ( is_array( $needlogin ) ) {
1653
- $delta = array();
1654
- foreach ( $needlogin as $item ) {
1655
- $delta[] = $item['id'];
1656
- }
1657
  }
1658
- $final_array = array_diff( $final_array, $delta );
1659
  }
1660
 
1661
  // remove dups from $final_array
@@ -1667,7 +1592,7 @@ global $wppa_session;
1667
  // Make album clause
1668
  $alb_clause = '';
1669
 
1670
- // If rootsearch, the album clause resticts to sub the root
1671
  // else: maybe category limited or exclude separates
1672
  // See for rootsearch
1673
  if ( wppa( 'is_rootsearch' ) && isset ( $wppa_session['search_root'] ) ) {
@@ -1832,6 +1757,130 @@ global $wppa_session;
1832
  return $thumbs;
1833
  }
1834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1835
  // Handle the select thumbs query
1836
  // @1: The MySql query
1837
  // @2: bool. Set to false if the expected count of thumbs is always less than 2500
3
  * Package: wp-photo-album-plus
4
  *
5
  * Various functions
6
+ * Version 6.7.05
7
  *
8
  */
9
 
994
 
995
  // Search?
996
  elseif ( wppa( 'src' ) ) {
997
+
998
+ $searchstring = wppa( 'searchstring' );
999
+ if ( ! empty ( $wppa_session['use_searchstring'] ) ) $searchstring = $wppa_session['use_searchstring'];
1000
+
1001
+ $final_array = wppa_get_array_ids_from_searchstring( $searchstring, 'albums' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1002
 
1003
  // If Catbox specifies a category to limit, remove all albums that do not have the desired cat.
1004
  if ( wppa( 'catbox' ) ) {
1565
  if ( ! empty ( $wppa_session['use_searchstring'] ) ) $searchstring = $wppa_session['use_searchstring'];
1566
 
1567
  $final_array = array();
1568
+ $final_array = wppa_get_array_ids_from_searchstring( $searchstring, 'photos' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1569
 
1570
  // Remove scheduled and pending and trashed when not can moderate
1571
  if ( ! current_user_can( 'wppa_moderate' ) ) {
1572
+ $needmod = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_PHOTOS . "` WHERE `status` = 'scheduled' OR `status` = 'pending' OR `album` <= '-9'" );
1573
  if ( is_array( $needmod ) ) {
1574
+ $final_array = array_diff( $final_array, $needmod );
 
 
 
1575
  }
 
1576
  }
1577
 
1578
  // Remove private and trashed when not logged in
1579
  if ( ! is_user_logged_in() ) {
1580
+ $needlogin = $wpdb->get_col( "SELECT `id` FROM `" . WPPA_PHOTOS . "` WHERE `status` = 'private' OR `album` <= '-9'" );
1581
  if ( is_array( $needlogin ) ) {
1582
+ $final_array = array_diff( $final_array, $needlogin );
 
 
 
1583
  }
 
1584
  }
1585
 
1586
  // remove dups from $final_array
1592
  // Make album clause
1593
  $alb_clause = '';
1594
 
1595
+ // If rootsearch, the album clause restricts to sub the root
1596
  // else: maybe category limited or exclude separates
1597
  // See for rootsearch
1598
  if ( wppa( 'is_rootsearch' ) && isset ( $wppa_session['search_root'] ) ) {
1757
  return $thumbs;
1758
  }
1759
 
1760
+ // Get the array of ids based on the supplied searchstring
1761
+ function wppa_get_array_ids_from_searchstring( $searchstring, $type ) {
1762
+ global $wpdb;
1763
+
1764
+ // Sanitize input
1765
+ if ( ! in_array( $type, array( 'albums', 'photos' ) ) ) {
1766
+ die( 'Unsupported type:' . $type . ' in wppa_get_array_ids_from_searchstring()' );
1767
+ }
1768
+
1769
+ // Split searchstring into OR chunks
1770
+ $chunks = explode( ',', stripslashes( strtolower( $searchstring ) ) );
1771
+
1772
+ // Init
1773
+ $final_array = array();
1774
+
1775
+ // Do all non empty chunks
1776
+ foreach ( $chunks as $chunk ) if ( strlen( trim( $chunk ) ) ) {
1777
+
1778
+ // Init this chunk
1779
+ $not_words = array();
1780
+ $item_array = array();
1781
+ $not_item_array = array();
1782
+
1783
+ // Get the words of this chunk
1784
+ $words = wppa_index_raw_to_words( $chunk, false, wppa_opt( 'search_min_length' ), false );
1785
+
1786
+ // Remove !words and put them into the not_words array.
1787
+ if ( ! empty( $words ) ) foreach( array_keys( $words ) as $key ) {
1788
+ if ( substr( $words[$key], 0, 1 ) == '!' ) {
1789
+ $not_words[] = substr( $words[$key], 1 );
1790
+ unset( $words[$key] );
1791
+ }
1792
+ }
1793
+
1794
+ // Meet all words in the chunk if it is not empty
1795
+ if ( ! empty( $words ) ) {
1796
+
1797
+ // Process all words from this chunk
1798
+ foreach ( $words as $word ) {
1799
+
1800
+ // Ceanup word
1801
+ $word = trim( $word );
1802
+
1803
+ // Process only if the search token is long enough
1804
+ if ( strlen( $word ) >= wppa_opt( 'search_min_length' ) ) {
1805
+
1806
+ // Trim searchword to a max of 20 chars
1807
+ if ( strlen( $word ) > 20 ) $word = substr( $word, 0, 20 );
1808
+
1809
+ // Floating searchtoken?
1810
+ if ( wppa_switch( 'wild_front' ) ) {
1811
+ $idxs = $wpdb->get_col( "SELECT `" . $type . "` FROM `" . WPPA_INDEX . "` WHERE `slug` LIKE '%" . $word . "%'" );
1812
+ }
1813
+ else {
1814
+ $idxs = $wpdb->get_col( "SELECT `" . $type . "` FROM `" . WPPA_INDEX . "` WHERE `slug` LIKE '" . $word . "%'" );
1815
+ }
1816
+
1817
+ // $item_array is an array of arrays with item ids per word.
1818
+ $ids = array();
1819
+ if ( ! empty( $idxs ) ) foreach( $idxs as $i ) {
1820
+ $ids = array_merge( $ids, wppa_index_string_to_array( $i ) );
1821
+ }
1822
+ $item_array[] = $ids;
1823
+
1824
+ }
1825
+ }
1826
+
1827
+ // Must meet all words: intersect item sets. The first element serves as accumulator.
1828
+ foreach ( array_keys( $item_array ) as $idx ) {
1829
+ if ( $idx > 0 ) {
1830
+ $item_array[0] = array_intersect( $item_array[0], $item_array[$idx] );
1831
+ }
1832
+ }
1833
+ }
1834
+
1835
+ // Now remove possible results that are excluded by the !words in this chunk
1836
+ if ( ! empty( $not_words ) ) {
1837
+
1838
+ // Do all not words
1839
+ foreach( $not_words as $word ) {
1840
+
1841
+ // Process only if the search token is long enough
1842
+ if ( strlen( $word ) >= wppa_opt( 'search_min_length' ) ) {
1843
+
1844
+ // Trim searchword to a max of 20 chars
1845
+ if ( strlen( $word ) > 20 ) $word = substr( $word, 0, 20 );
1846
+
1847
+ // Floating searchtoken?
1848
+ if ( wppa_switch( 'wild_front' ) ) {
1849
+ $idxs = $wpdb->get_col( "SELECT `" . $type . "` FROM `" . WPPA_INDEX . "` WHERE `slug` LIKE '%" . $word . "%'" );
1850
+ }
1851
+ else {
1852
+ $idxs = $wpdb->get_col( "SELECT `" . $type . "` FROM `" . WPPA_INDEX . "` WHERE `slug` LIKE '" . $word . "%'" );
1853
+ }
1854
+
1855
+ // Find ids to exclude for the current !word
1856
+ $ids = array();
1857
+ if ( ! empty( $idxs ) ) foreach( $idxs as $i ) {
1858
+ $ids = array_merge( $ids, wppa_index_string_to_array( $i ) );
1859
+ }
1860
+
1861
+ // Accumuate items to exclude in $not_item_array for this chunk.
1862
+ $not_item_array = array_merge( $not_item_array, $ids );
1863
+ }
1864
+ }
1865
+ }
1866
+
1867
+ // All words and not wrds of this chunk processed, remove not_array from item_array
1868
+ if ( ! empty( $not_item_array ) ) {
1869
+ $item_array[0] = array_diff( $item_array[0], $not_item_array );
1870
+ }
1871
+
1872
+ // Save partial result of this chunk into the final_array accumulator
1873
+ if ( isset( $item_array[0] ) ) {
1874
+ $final_array = array_merge( $final_array, $item_array[0] );
1875
+ }
1876
+ }
1877
+
1878
+ // Remove dups
1879
+ $final_array = array_unique( $final_array );
1880
+
1881
+ return $final_array;
1882
+ }
1883
+
1884
  // Handle the select thumbs query
1885
  // @1: The MySql query
1886
  // @2: bool. Set to false if the expected count of thumbs is always less than 2500
wppa-index.php CHANGED
@@ -3,7 +3,7 @@
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
- * Version 6.6.24
7
  *
8
  *
9
  */
@@ -163,10 +163,10 @@ global $pcount;
163
  //
164
  // @1: string. Any test string may contain all kind of garbage.
165
  //
166
- function wppa_index_raw_to_words( $xtext, $no_skips = false ) {
167
 
168
  // Find chars to be replaced by delimiters (spaces)
169
- $ignore = array( '"', "'", '`', '\\', '>', '<', ',', ':', ';', '!', '?', '=', '_',
170
  '[', ']', '(', ')', '{', '}', '..', '...', '....', "\n", "\r",
171
  "\t", '.jpg', '.png', '.gif', '&#039', '&amp',
172
  'w#cc0', 'w#cc1', 'w#cc2', 'w#cc3', 'w#cc4', 'w#cc5', 'w#cc6', 'w#cc7', 'w#cc8', 'w#cc9',
@@ -176,6 +176,9 @@ function wppa_index_raw_to_words( $xtext, $no_skips = false ) {
176
  if ( wppa_switch( 'index_ignore_slash' ) ) {
177
  $ignore[] = '/';
178
  }
 
 
 
179
 
180
  // Find words to skip
181
  $skips = $no_skips ? array() : get_option( 'wppa_index_skips', array() );
3
  * Package: wp-photo-album-plus
4
  *
5
  * Contains all indexing functions
6
+ * Version 6.7.05
7
  *
8
  *
9
  */
163
  //
164
  // @1: string. Any test string may contain all kind of garbage.
165
  //
166
+ function wppa_index_raw_to_words( $xtext, $no_skips = false, $minlen = '3', $no_excl = true ) {
167
 
168
  // Find chars to be replaced by delimiters (spaces)
169
+ $ignore = array( '"', "'", '`', '\\', '>', '<', ',', ':', ';', '?', '=', '_',
170
  '[', ']', '(', ')', '{', '}', '..', '...', '....', "\n", "\r",
171
  "\t", '.jpg', '.png', '.gif', '&#039', '&amp',
172
  'w#cc0', 'w#cc1', 'w#cc2', 'w#cc3', 'w#cc4', 'w#cc5', 'w#cc6', 'w#cc7', 'w#cc8', 'w#cc9',
176
  if ( wppa_switch( 'index_ignore_slash' ) ) {
177
  $ignore[] = '/';
178
  }
179
+ if ( $no_excl ) {
180
+ $ignore[] = '!';
181
+ }
182
 
183
  // Find words to skip
184
  $skips = $no_skips ? array() : get_option( 'wppa_index_skips', array() );
wppa-settings-autosave.php CHANGED
@@ -772,7 +772,7 @@ global $wp_version;
772
  $slug = 'wppa_min_thumbs';
773
  $html = wppa_input($slug, '40px', '', __('photos', 'wp-photo-album-plus'));
774
  $clas = '';
775
- $tags = 'size,system';
776
  wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
777
 
778
  $name = __('Border thickness', 'wp-photo-album-plus');
@@ -3766,7 +3766,7 @@ global $wp_version;
3766
  $slug = 'wppa_thumbs_first';
3767
  $html = wppa_checkbox($slug);
3768
  $clas = '';
3769
- $tags = 'system,layout';
3770
  wppa_setting($slug, '20', $name, $desc, $html, $help, $clas, $tags);
3771
 
3772
  $name = __('Login links', 'wp-photo-album-plus');
@@ -6218,7 +6218,7 @@ global $wp_version;
6218
  $html4 = '';
6219
  $html = array($html1, $html2, $html3, $html4);
6220
  $clas = '';
6221
- $tags = 'link';
6222
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
6223
  }
6224
 
772
  $slug = 'wppa_min_thumbs';
773
  $html = wppa_input($slug, '40px', '', __('photos', 'wp-photo-album-plus'));
774
  $clas = '';
775
+ $tags = 'size,system,album';
776
  wppa_setting($slug, '4', $name, $desc, $html, $help, $clas, $tags);
777
 
778
  $name = __('Border thickness', 'wp-photo-album-plus');
3766
  $slug = 'wppa_thumbs_first';
3767
  $html = wppa_checkbox($slug);
3768
  $clas = '';
3769
+ $tags = 'system,layout,album';
3770
  wppa_setting($slug, '20', $name, $desc, $html, $help, $clas, $tags);
3771
 
3772
  $name = __('Login links', 'wp-photo-album-plus');
6218
  $html4 = '';
6219
  $html = array($html1, $html2, $html3, $html4);
6220
  $clas = '';
6221
+ $tags = 'link,cover';
6222
  wppa_setting($slug, '11', $name, $desc, $html, $help, $clas, $tags);
6223
  }
6224
 
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: 6.7.04
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/
@@ -22,8 +22,8 @@ global $wpdb;
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
- global $wppa_revno; $wppa_revno = '6704'; // WPPA db version
26
- global $wppa_api_version; $wppa_api_version = '6-7-04-002'; // 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: 6.7.05
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/
22
  global $wp_version;
23
 
24
  /* WPPA GLOBALS */
25
+ global $wppa_revno; $wppa_revno = '6705'; // WPPA db version
26
+ global $wppa_api_version; $wppa_api_version = '6-7-05-002'; // WPPA software version
27
 
28
  /* start timers */
29
  global $wppa_starttime; $wppa_starttime = microtime( true );