Ultimate FAQ - Version 1.6.7

Version Description

  • Fixed the settings page for those using PHP7
  • Fixed the faq_id attribute of the select-faq shortcode
Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Ultimate FAQ
Version 1.6.7
Comparing to
See all releases

Code changes from version 1.6.6 to 1.6.7

Main.php CHANGED
@@ -7,7 +7,7 @@ Author: Etoile Web Design
7
  Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: ultimate-faqs
10
- Version: 1.6.6
11
  */
12
 
13
  global $ewd_ufaq_message;
7
  Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: ultimate-faqs
10
+ Version: 1.6.7
11
  */
12
 
13
  global $ewd_ufaq_message;
Shortcodes/DisplayFAQs.php CHANGED
@@ -127,6 +127,8 @@ function Display_FAQs($atts) {
127
  $Category_Array = array("EWD_UFAQ_ALL_CATEGORIES");
128
  }
129
 
 
 
130
  if (isset($_GET['include_category'])) {$include_category = $_GET['include_category'];}
131
  if (get_query_var('ufaq_category_slug') != "") {$include_category = get_query_var('ufaq_category_slug');}
132
  if ($include_category_ids != "" ) {$include_category_ids_array = explode(",", $include_category_ids);}
@@ -213,15 +215,25 @@ function Display_FAQs($atts) {
213
  }
214
 
215
  $Counter = 0;
 
216
  foreach ($Category_Array as $Category) {
217
 
218
- if ($Category != "EWD_UFAQ_ALL_CATEGORIES") {
219
  if (!EWD_UFAQ_Category_Matches($Category, $include_category_array, $exclude_category_array)) {continue;}
220
 
221
  $category_array = array( 'taxonomy' => 'ufaq-category',
222
  'field' => 'slug',
223
  'terms' => $Category->slug
224
  );
 
 
 
 
 
 
 
 
 
225
  }
226
 
227
  $tax_query_array = array('relation' => 'AND');
@@ -233,12 +245,13 @@ function Display_FAQs($atts) {
233
  $params = array('posts_per_page' => $post_count,
234
  'post_status' => 'publish',
235
  'post_type' => 'ufaq',
 
236
  'orderby' => $orderby,
237
  'order' => $order,
238
- 'tax_query' => $tax_query_array,
239
  'suppress_filters' => false
240
  );
241
  unset($tax_query_array);
 
242
  if ($search_string != "") {$params['s'] = $search_string;}
243
  if (is_array($post_id_array)) {$params['post__in'] = $post_id_array;}
244
  if ($orig_order_setting == "popular") {$params['meta_key'] = 'ufaq_view_count';}
@@ -246,7 +259,7 @@ function Display_FAQs($atts) {
246
  if ($orig_order_setting == "set_order") {$params['meta_key'] = 'ufaq_order';}
247
  $FAQ_Query = new WP_Query($params);
248
 
249
- if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and $FAQ_Query->post_count > 0) {
250
  $ReturnString .= "<div class='ufaq-faq-category'>";
251
  $ReturnString .= "<div class='ufaq-faq-category-title";
252
  if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-title-toggle";}
@@ -426,7 +439,7 @@ function Display_FAQs($atts) {
426
  $Counter++;
427
  endwhile;
428
 
429
- if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and $FAQ_Query->post_count > 0) {
430
  $ReturnString .= "</div>";
431
  $ReturnString .= "</div>";
432
  $HeaderString .= "</div>";
127
  $Category_Array = array("EWD_UFAQ_ALL_CATEGORIES");
128
  }
129
 
130
+ if ($post__in != "" and $Category_Array[0] != "EWD_UFAQ_ALL_CATEGORIES") {$Category_Array[] = "uncategorized";}
131
+
132
  if (isset($_GET['include_category'])) {$include_category = $_GET['include_category'];}
133
  if (get_query_var('ufaq_category_slug') != "") {$include_category = get_query_var('ufaq_category_slug');}
134
  if ($include_category_ids != "" ) {$include_category_ids_array = explode(",", $include_category_ids);}
215
  }
216
 
217
  $Counter = 0;
218
+ $All_Categories = array();
219
  foreach ($Category_Array as $Category) {
220
 
221
+ if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and $Category != "uncategorized") {
222
  if (!EWD_UFAQ_Category_Matches($Category, $include_category_array, $exclude_category_array)) {continue;}
223
 
224
  $category_array = array( 'taxonomy' => 'ufaq-category',
225
  'field' => 'slug',
226
  'terms' => $Category->slug
227
  );
228
+
229
+ $All_Categories[] = $Category->slug;
230
+ }
231
+ elseif ($Category == "uncategorized") {
232
+ $category_array = array( 'taxonomy' => 'ufaq-category',
233
+ 'field' => 'slug',
234
+ 'terms' => $All_Categories,
235
+ 'operator' => 'NOT IN'
236
+ );
237
  }
238
 
239
  $tax_query_array = array('relation' => 'AND');
245
  $params = array('posts_per_page' => $post_count,
246
  'post_status' => 'publish',
247
  'post_type' => 'ufaq',
248
+ 'tax_query' => $tax_query_array,
249
  'orderby' => $orderby,
250
  'order' => $order,
 
251
  'suppress_filters' => false
252
  );
253
  unset($tax_query_array);
254
+
255
  if ($search_string != "") {$params['s'] = $search_string;}
256
  if (is_array($post_id_array)) {$params['post__in'] = $post_id_array;}
257
  if ($orig_order_setting == "popular") {$params['meta_key'] = 'ufaq_view_count';}
259
  if ($orig_order_setting == "set_order") {$params['meta_key'] = 'ufaq_order';}
260
  $FAQ_Query = new WP_Query($params);
261
 
262
+ if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and $Category != 'uncategorized' and $FAQ_Query->post_count > 0) {
263
  $ReturnString .= "<div class='ufaq-faq-category'>";
264
  $ReturnString .= "<div class='ufaq-faq-category-title";
265
  if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-title-toggle";}
439
  $Counter++;
440
  endwhile;
441
 
442
+ if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and $Category != "uncategorized" and $FAQ_Query->post_count > 0) {
443
  $ReturnString .= "</div>";
444
  $ReturnString .= "</div>";
445
  $HeaderString .= "</div>";
Shortcodes/SelectFAQ.php CHANGED
@@ -17,7 +17,7 @@ function Display_Select_FAQs($atts) {
17
  else {$name_array = array();}
18
  if ($faq_slug != "") {$slug_array = explode(",", $faq_slug);}
19
  else {$slug_array = array();}
20
- if ($no_comments != "") {$id_array = explode(",", $faq_id);}
21
  else {$id_array = array();}
22
 
23
  $post_id_array = array();
@@ -33,7 +33,7 @@ function Display_Select_FAQs($atts) {
33
  }
34
 
35
  foreach ($id_array as $post_id) {
36
- $post_id_array[] = $post_id;
37
  }
38
 
39
  $json_ids = str_replace(array("[", "]"), array("&lsqb;", "&rsqb;"), json_encode($post_id_array));
17
  else {$name_array = array();}
18
  if ($faq_slug != "") {$slug_array = explode(",", $faq_slug);}
19
  else {$slug_array = array();}
20
+ if ($faq_id != "") {$id_array = explode(",", $faq_id);}
21
  else {$id_array = array();}
22
 
23
  $post_id_array = array();
33
  }
34
 
35
  foreach ($id_array as $post_id) {
36
+ $post_id_array[] = (int) $post_id;
37
  }
38
 
39
  $json_ids = str_replace(array("[", "]"), array("&lsqb;", "&rsqb;"), json_encode($post_id_array));
css/CSSTidy/class.csstidy.php CHANGED
@@ -252,7 +252,7 @@ var $line = 1;
252
  * @access private
253
  * @version 1.3
254
  */
255
- function csstidy()
256
  {
257
  $this->settings['remove_bslash'] = true;
258
  $this->settings['compress_colors'] = true;
252
  * @access private
253
  * @version 1.3
254
  */
255
+ function __construct()
256
  {
257
  $this->settings['remove_bslash'] = true;
258
  $this->settings['compress_colors'] = true;
css/CSSTidy/class.csstidy_optimise.php CHANGED
@@ -44,7 +44,7 @@ class csstidy_optimise
44
  * @access private
45
  * @version 1.0
46
  */
47
- function csstidy_optimise(&$css)
48
  {
49
  $this->parser =& $css;
50
  $this->css =& $css->css;
44
  * @access private
45
  * @version 1.0
46
  */
47
+ function __construct(&$css)
48
  {
49
  $this->parser =& $css;
50
  $this->css =& $css->css;
css/CSSTidy/class.csstidy_print.php CHANGED
@@ -65,7 +65,7 @@ class csstidy_print
65
  * @access private
66
  * @version 1.0
67
  */
68
- function csstidy_print(&$css)
69
  {
70
  $this->parser =& $css;
71
  $this->css =& $css->css;
65
  * @access private
66
  * @version 1.0
67
  */
68
+ function __construct(&$css)
69
  {
70
  $this->parser =& $css;
71
  $this->css =& $css->css;
readme.txt CHANGED
@@ -10,7 +10,6 @@ FAQ plugin that lets you easily create, order and publicize FAQs, insert 3 style
10
 
11
  == Description ==
12
 
13
-
14
  <a href='http://www.etoilewebdesign.com/ultimate-faq-demo/'>FAQ Demo</a>
15
 
16
  FAQ plugin that lets you create FAQ (frequently asked questions), organize FAQs and publicize your FAQ in no time through your Wordpress admin panel. Select from multiple FAQ styles and FAQ layouts.
@@ -266,11 +265,16 @@ Video 3 - FAQs Ordering
266
  26. FAQ widgets
267
 
268
 
 
269
  == Changelog ==
 
 
 
 
270
  = 1.6.6 =
271
  - Added in a captcha option for the submit question shortcode
272
- - Fixed an HTML validation error
273
-
274
  = 1.6.5 =
275
  - Updated color select sanitizing function
276
 
@@ -606,7 +610,4 @@ Video 3 - FAQs Ordering
606
  - Fix for the FAQ ordering bug
607
 
608
  = 1.0.0 =
609
- - Premium version release, check out our website for all of the details <http://www.etoilewebdesign.com/ultimate-faq/>
610
-
611
-
612
-
10
 
11
  == Description ==
12
 
 
13
  <a href='http://www.etoilewebdesign.com/ultimate-faq-demo/'>FAQ Demo</a>
14
 
15
  FAQ plugin that lets you create FAQ (frequently asked questions), organize FAQs and publicize your FAQ in no time through your Wordpress admin panel. Select from multiple FAQ styles and FAQ layouts.
265
  26. FAQ widgets
266
 
267
 
268
+
269
  == Changelog ==
270
+ = 1.6.7 =
271
+ - Fixed the settings page for those using PHP7
272
+ - Fixed the faq_id attribute of the select-faq shortcode
273
+
274
  = 1.6.6 =
275
  - Added in a captcha option for the submit question shortcode
276
+ - Fixed an HTML validation error
277
+
278
  = 1.6.5 =
279
  - Updated color select sanitizing function
280
 
610
  - Fix for the FAQ ordering bug
611
 
612
  = 1.0.0 =
613
+ - Premium version release, check out our website for all of the details <http://www.etoilewebdesign.com/ultimate-faq/>