Ultimate FAQ - Version 1.5.6

Version Description

  • Fixed minor dashboard and attribute errors
Download this release

Release Info

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

Code changes from version 1.5.5 to 1.5.6

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: EWD_UFAQ
10
- Version: 1.5.5
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: EWD_UFAQ
10
+ Version: 1.5.6
11
  */
12
 
13
  global $ewd_ufaq_message;
Shortcodes/DisplayFAQs.php CHANGED
@@ -121,10 +121,11 @@ function Display_FAQs($atts) {
121
 
122
  if (isset($_GET['include_category'])) {$include_category = $_GET['include_category'];}
123
  if (get_query_var('ufaq_category_slug') != "") {$include_category = get_query_var('ufaq_category_slug');}
 
124
  if ($include_category_ids != "") {
125
- foreach ($include_category_ids as $Category_ID) {
126
  $Term = get_term_by('id', $Category_ID, 'ufaq-category');
127
- $include_category .= $Term->term_id . ",";
128
  }
129
  $include_category = substr($include_category, 0, -1);
130
  }
@@ -136,10 +137,11 @@ function Display_FAQs($atts) {
136
  'terms' => $include_category_array
137
  );
138
  }
 
139
  if ($exclude_category_ids != "") {
140
- foreach ($exclude_category_ids as $Category_ID) {
141
  $Term = get_term_by('id', $Category_ID, 'ufaq-category');
142
- $exclude_category .= $Term->term_id . ",";
143
  }
144
  $exclude_category = substr($exclude_category, 0, -1);
145
  }
121
 
122
  if (isset($_GET['include_category'])) {$include_category = $_GET['include_category'];}
123
  if (get_query_var('ufaq_category_slug') != "") {$include_category = get_query_var('ufaq_category_slug');}
124
+ if ($include_category_ids != "" ) {$include_category_ids_array = explode(",", $include_category_ids);}
125
  if ($include_category_ids != "") {
126
+ foreach ($include_category_ids_array as $Category_ID) {
127
  $Term = get_term_by('id', $Category_ID, 'ufaq-category');
128
+ $include_category .= $Term->slug . ",";
129
  }
130
  $include_category = substr($include_category, 0, -1);
131
  }
137
  'terms' => $include_category_array
138
  );
139
  }
140
+ if ($exclude_category_ids != "" ) {$exclude_category_ids_array = explode(",", $exclude_category_ids);}
141
  if ($exclude_category_ids != "") {
142
+ foreach ($exclude_category_ids_array as $Category_ID) {
143
  $Term = get_term_by('id', $Category_ID, 'ufaq-category');
144
+ $exclude_category .= $Term->slug . ",";
145
  }
146
  $exclude_category = substr($exclude_category, 0, -1);
147
  }
html/DashboardPage.php CHANGED
@@ -99,7 +99,7 @@ if (get_option("EWD_UFAQ_Update_Flag") == "Yes" or get_option("EWD_UFAQ_Install_
99
  <div class="ewd-dashboard-box-icon"><img src="<?php echo plugins_url(); ?>/ultimate-faqs/images/ewd-dashboard-icon-ufaq-02.png"/>
100
  </div>
101
  <div class="ewd-dashboard-box-value-and-field-container">
102
- <div class="ewd-dashboard-box-value"><?php echo $wpdb->get_var("SELECT SUM(meta_value) FROM $wpdb->postmeta WHERE meta_key='ufaq_view_count'"); ?>
103
  </div>
104
  <div class="ewd-dashboard-box-field">Views
105
  </div>
@@ -109,7 +109,7 @@ if (get_option("EWD_UFAQ_Update_Flag") == "Yes" or get_option("EWD_UFAQ_Install_
109
  <div class="ewd-dashboard-box-icon"><img src="<?php echo plugins_url(); ?>/ultimate-faqs/images/ewd-dashboard-icon-ufaq-03.png"/>
110
  </div>
111
  <div class="ewd-dashboard-box-value-and-field-container">
112
- <div class="ewd-dashboard-box-value"><?php echo max($wpdb->get_var("SELECT meta_value FROM $wpdb->postmeta WHERE meta_key='ufaq_view_count' ORDER BY cast(meta_value as unsigned) DESC")- 1, 0); ?>
113
  </div>
114
  <div class="ewd-dashboard-box-field">Most FAQ Views
115
  </div>
99
  <div class="ewd-dashboard-box-icon"><img src="<?php echo plugins_url(); ?>/ultimate-faqs/images/ewd-dashboard-icon-ufaq-02.png"/>
100
  </div>
101
  <div class="ewd-dashboard-box-value-and-field-container">
102
+ <div class="ewd-dashboard-box-value"><?php echo $wpdb->get_var("SELECT SUM(meta_value) FROM $wpdb->postmeta WHERE meta_key='ufaq_view_count' and post_id!='0'"); ?>
103
  </div>
104
  <div class="ewd-dashboard-box-field">Views
105
  </div>
109
  <div class="ewd-dashboard-box-icon"><img src="<?php echo plugins_url(); ?>/ultimate-faqs/images/ewd-dashboard-icon-ufaq-03.png"/>
110
  </div>
111
  <div class="ewd-dashboard-box-value-and-field-container">
112
+ <div class="ewd-dashboard-box-value"><?php echo $wpdb->get_var("SELECT meta_value FROM $wpdb->postmeta WHERE meta_key='ufaq_view_count' and post_id!='0' ORDER BY cast(meta_value as unsigned) DESC"); ?>
113
  </div>
114
  <div class="ewd-dashboard-box-field">Most FAQ Views
115
  </div>
readme.txt CHANGED
@@ -210,6 +210,9 @@ Video 3 - FAQs Ordering
210
  9. All answers displayed in the 'list' FAQ mode
211
 
212
  == Changelog ==
 
 
 
213
  = 1.5.5 =
214
  - Added in a new admin notification option for when questions are received
215
  - Added in two new shortcode attributes, 'include_category_ids' and 'exclude_category_ids', to let users include categories by ID instead of only by slug
210
  9. All answers displayed in the 'list' FAQ mode
211
 
212
  == Changelog ==
213
+ = 1.5.6 =
214
+ - Fixed minor dashboard and attribute errors
215
+
216
  = 1.5.5 =
217
  - Added in a new admin notification option for when questions are received
218
  - Added in two new shortcode attributes, 'include_category_ids' and 'exclude_category_ids', to let users include categories by ID instead of only by slug