Ultimate FAQ - Version 1.4.0

Version Description

  • Added two new FAQ display styles, minimalist and border block
  • Added in support for comments directly in the FAQs if enabled
  • Added two new premium features, FAQ ratings and FAQ custom fields
  • Added a premium styling option to let users select which heading the FAQ and comment titls have (h1, h2, etc.)
Download this release

Release Info

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

Code changes from version 1.3.5 to 1.4.0

Functions/EWD_UFAQ_Version_Update.php CHANGED
@@ -17,9 +17,20 @@ function EWD_UFAQ_Version_Update() {
17
  }
18
  }
19
 
 
 
 
 
 
 
 
 
 
20
  if (get_option("EWD_UFAQ_Toggle") == "") {update_option("EWD_UFAQ_Toggle", "Yes");}
21
  if (get_option("EWD_UFAQ_Display_Back_To_Top") == "") {update_option("EWD_UFAQ_Display_Back_To_Top", "No");}
 
22
  if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
 
23
  if (get_option("EWD_UFAQ_WooCommerce_FAQs") == "") {update_option("EWD_UFAQ_WooCommerce_FAQs", "No");}
24
  if (get_option("EWD_UFAQ_Use_Product") == "") {update_option("EWD_UFAQ_Use_Product", "Yes");}
25
  if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
@@ -27,6 +38,11 @@ function EWD_UFAQ_Version_Update() {
27
  if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
28
  if (get_option("EWD_UFAQ_Slug_Base") == "") {update_option("EWD_UFAQ_Slug_Base", "ufaqs");}
29
 
 
 
 
 
 
30
  update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
31
  }
32
 
@@ -45,7 +61,7 @@ function EWD_UFAQ_Version_Update_Box() {
45
  <h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
46
  <div class="inside">
47
  <?php if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate FAQs plugin.", "EWD_UFAQ"); ?><br> <a href='https://www.youtube.com/channel/UCZPuaoetCJB1vZOmpnMxJNw'><?php _e("Subscribe to our YouTube channel ", "EWD_UFAQ"); ?></a> <?php _e("for tutorial videos on this and our other plugins!", "EWD_UFAQ");?> </li></ul>
48
- <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.3.5!", "EWD_UFAQ"); ?><br> <a href='https://wordpress.org/support/view/plugin-reviews/ultimate-faqs?filter=5'><?php _e("Please rate our plugin", "EWD_UFAQ"); ?></a> <?php _e("if you find Ultimate FAQs useful!", "EWD_UFAQ");?> </li></ul><?php } ?>
49
 
50
  <?php /* if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate Product Catalogue Plugin.", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul>
51
  <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 2.2.9!", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul><?php } */ ?>
17
  }
18
  }
19
 
20
+ if (is_array($FAQs)) {
21
+ foreach ($FAQs as $FAQ) {
22
+ $Current_Order = get_post_meta($FAQ->ID, "FAQ_Total_Score", true);
23
+ if ($Current_Order == "") {
24
+ update_post_meta($FAQ->ID, 'FAQ_Total_Score', 0);
25
+ }
26
+ }
27
+ }
28
+
29
  if (get_option("EWD_UFAQ_Toggle") == "") {update_option("EWD_UFAQ_Toggle", "Yes");}
30
  if (get_option("EWD_UFAQ_Display_Back_To_Top") == "") {update_option("EWD_UFAQ_Display_Back_To_Top", "No");}
31
+ if (get_option("EWD_UFAQ_Comments_On") == "") {update_option("EWD_UFAQ_Comments_On", "No");}
32
  if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
33
+ if (get_option("EWD_UFAQ_FAQ_Ratings") == "") {update_option("EWD_UFAQ_FAQ_Ratings", "No");}
34
  if (get_option("EWD_UFAQ_WooCommerce_FAQs") == "") {update_option("EWD_UFAQ_WooCommerce_FAQs", "No");}
35
  if (get_option("EWD_UFAQ_Use_Product") == "") {update_option("EWD_UFAQ_Use_Product", "Yes");}
36
  if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
38
  if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
39
  if (get_option("EWD_UFAQ_Slug_Base") == "") {update_option("EWD_UFAQ_Slug_Base", "ufaqs");}
40
 
41
+ if (get_option("EWD_UFAQ_Hide_Blank_Fields") == "") {update_option("EWD_UFAQ_Hide_Blank_Fields", "Yes");}
42
+
43
+ if (get_option("EWD_UFAQ_Styling_Category_Heading_Type") == "") {update_option("EWD_UFAQ_Styling_Category_Heading_Type", "h4");}
44
+ if (get_option("EWD_UFAQ_Styling_FAQ_Heading_Type") == "") {update_option("EWD_UFAQ_Styling_FAQ_Heading_Type", "h4");}
45
+
46
  update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
47
  }
48
 
61
  <h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
62
  <div class="inside">
63
  <?php if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate FAQs plugin.", "EWD_UFAQ"); ?><br> <a href='https://www.youtube.com/channel/UCZPuaoetCJB1vZOmpnMxJNw'><?php _e("Subscribe to our YouTube channel ", "EWD_UFAQ"); ?></a> <?php _e("for tutorial videos on this and our other plugins!", "EWD_UFAQ");?> </li></ul>
64
+ <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.4.0!", "EWD_UFAQ"); ?><br> <a href='https://wordpress.org/support/view/plugin-reviews/ultimate-faqs?filter=5'><?php _e("Please rate our plugin", "EWD_UFAQ"); ?></a> <?php _e("if you find Ultimate FAQs useful!", "EWD_UFAQ");?> </li></ul><?php } ?>
65
 
66
  <?php /* if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate Product Catalogue Plugin.", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul>
67
  <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 2.2.9!", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul><?php } */ ?>
Functions/EWD_UFAQ_Widgets.php CHANGED
@@ -20,7 +20,7 @@ class EWD_UFAQ_Display_FAQ_Post_List extends WP_Widget {
20
  */
21
  public function widget( $args, $instance ) {
22
  echo $args['before_widget'];
23
- echo do_shortcode("[select-faq faq_id='". $instance['faq_id'] . "']");
24
  echo $args['after_widget'];
25
  }
26
 
@@ -75,7 +75,7 @@ class EWD_UFAQ_Display_Recent_FAQS extends WP_Widget {
75
  */
76
  public function widget( $args, $instance ) {
77
  echo $args['before_widget'];
78
- echo do_shortcode("[recent-faqs post_count='". $instance['post_count'] . "']");
79
  echo $args['after_widget'];
80
  }
81
 
@@ -130,7 +130,7 @@ class EWD_UFAQ_Display_Popular_FAQS extends WP_Widget {
130
  */
131
  public function widget( $args, $instance ) {
132
  echo $args['before_widget'];
133
- echo do_shortcode("[popular-faqs post_count='". $instance['post_count'] . "']");
134
  echo $args['after_widget'];
135
  }
136
 
@@ -185,7 +185,7 @@ class EWD_UFAQ_Display_FAQ_Categories extends WP_Widget {
185
  */
186
  public function widget( $args, $instance ) {
187
  echo $args['before_widget'];
188
- echo do_shortcode("[ultimate-faqs include_category='". $instance['include_category'] . "']");
189
  echo $args['after_widget'];
190
  }
191
 
20
  */
21
  public function widget( $args, $instance ) {
22
  echo $args['before_widget'];
23
+ echo do_shortcode("[select-faq faq_id='". $instance['faq_id'] . "' no_comments='Yes']");
24
  echo $args['after_widget'];
25
  }
26
 
75
  */
76
  public function widget( $args, $instance ) {
77
  echo $args['before_widget'];
78
+ echo do_shortcode("[recent-faqs post_count='". $instance['post_count'] . "' no_comments='Yes']");
79
  echo $args['after_widget'];
80
  }
81
 
130
  */
131
  public function widget( $args, $instance ) {
132
  echo $args['before_widget'];
133
+ echo do_shortcode("[popular-faqs post_count='". $instance['post_count'] . "' no_comments='Yes']");
134
  echo $args['after_widget'];
135
  }
136
 
185
  */
186
  public function widget( $args, $instance ) {
187
  echo $args['before_widget'];
188
+ echo do_shortcode("[ultimate-faqs include_category='". $instance['include_category'] . "' no_comments='Yes']");
189
  echo $args['after_widget'];
190
  }
191
 
Functions/Process_Ajax.php CHANGED
@@ -16,6 +16,32 @@ function UFAQ_Search() {
16
  add_action('wp_ajax_ufaq_search', 'UFAQ_Search');
17
  add_action( 'wp_ajax_nopriv_ufaq_search', 'UFAQ_Search');
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  // Records the number of time an FAQ post is opened
20
  function UFAQ_Record_View() {
21
  $Path = ABSPATH . 'wp-load.php';
16
  add_action('wp_ajax_ufaq_search', 'UFAQ_Search');
17
  add_action( 'wp_ajax_nopriv_ufaq_search', 'UFAQ_Search');
18
 
19
+ // Change the up and down votes for a particular FAQ
20
+ function EWD_UFAQ_Update_Rating() {
21
+ /*$Path = ABSPATH . 'wp-load.php';
22
+ include_once($Path);*/
23
+
24
+ $FAQ_ID = $_POST['FAQ_ID'];
25
+ $Vote_Type = $_POST['Vote_Type'];
26
+
27
+ if ($Vote_Type == "Up") {
28
+ $Up_Votes = get_post_meta($FAQ_ID, "FAQ_Up_Votes", true);
29
+ update_post_meta($FAQ_ID, "FAQ_Up_Votes", $Up_Votes + 1);
30
+ $Total_Score = get_post_meta($FAQ_ID, "FAQ_Total_Score", true);
31
+ update_post_meta($FAQ_ID, "FAQ_Total_Score", $Total_Score + 1);
32
+ }
33
+ if ($Vote_Type == "Down") {
34
+ $Down_Votes = get_post_meta($FAQ_ID, "FAQ_Down_Votes", true);
35
+ update_post_meta($FAQ_ID, "FAQ_Down_Votes", $Down_Votes + 1);
36
+ $Total_Score = get_post_meta($FAQ_ID, "FAQ_Total_Score", true);
37
+ update_post_meta($FAQ_ID, "FAQ_Total_Score", $Total_Score - 1);
38
+ }
39
+
40
+ die();
41
+ }
42
+ add_action('wp_ajax_ufaq_update_rating', 'EWD_UFAQ_Update_Rating');
43
+ add_action( 'wp_ajax_nopriv_ufaq_update_rating', 'EWD_UFAQ_Update_Rating');
44
+
45
  // Records the number of time an FAQ post is opened
46
  function UFAQ_Record_View() {
47
  $Path = ABSPATH . 'wp-load.php';
Functions/Register_EWD_UFAQ_Posts_Taxonomies.php CHANGED
@@ -90,6 +90,9 @@ function EWD_UFAQ_Add_Meta_Boxes () {
90
  * @param WP_Post $post The object for the current post/page.
91
  */
92
  function EWD_UFAQ_Meta_Box( $post ) {
 
 
 
93
 
94
  // Add a nonce field so we can check for it later.
95
  wp_nonce_field( 'EWD_UFAQ_Save_Meta_Box_Data', 'EWD_UFAQ_meta_box_nonce' );
@@ -98,23 +101,106 @@ function EWD_UFAQ_Meta_Box( $post ) {
98
  * Use get_post_meta() to retrieve an existing value
99
  * from the database and use the value for the form.
100
  */
101
- $Value = get_post_meta( $post->ID, 'EWD_UFAQ_Post_Author', true );
102
 
103
- if ($Value == "") {
104
  $User = wp_get_current_user();
105
- $Value = $User->display_name;
106
  }
107
-
108
  echo "<div class='ewd-ufaq-meta-field'>";
109
  echo "<label for='Post_Author'>";
110
  echo __( "Author Display Name:", 'EWD_UFAQ' );
111
  echo " </label>";
112
- echo "<input type='text' id='ewd-ufaq-post-author' name='Post_Author' value='" . esc_attr( $Value ) . "' size='25' />";
113
  echo "</div>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  }
115
 
116
  add_action( 'save_post', 'EWD_UFAQ_Save_Meta_Box_Data' );
117
  function EWD_UFAQ_Save_Meta_Box_Data($post_id) {
 
 
 
118
 
119
  /*
120
  * We need to verify this came from our screen and with proper authorization,
@@ -150,9 +236,40 @@ function EWD_UFAQ_Save_Meta_Box_Data($post_id) {
150
  }
151
  }
152
 
153
- /* OK, it's safe for us to save the data now. If there's no product name, don't save any other information.*/
154
- if ( ! isset( $_POST['Post_Author'] ) ) {
155
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  }
157
 
158
  // Sanitize user input.
@@ -161,5 +278,44 @@ function EWD_UFAQ_Save_Meta_Box_Data($post_id) {
161
  // Update the meta field in the database.
162
  update_post_meta( $post_id, 'EWD_UFAQ_Post_Author', $Post_Author );
163
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  }
165
  ?>
90
  * @param WP_Post $post The object for the current post/page.
91
  */
92
  function EWD_UFAQ_Meta_Box( $post ) {
93
+ $FAQ_Fields_Array = get_option("EWD_UFAQ_FAQ_Fields");
94
+ if (!is_array($FAQ_Fields_Array)) {$FAQ_Fields_Array = array();}
95
+ $FAQ_Ratings = get_option("EWD_UFAQ_FAQ_Ratings");
96
 
97
  // Add a nonce field so we can check for it later.
98
  wp_nonce_field( 'EWD_UFAQ_Save_Meta_Box_Data', 'EWD_UFAQ_meta_box_nonce' );
101
  * Use get_post_meta() to retrieve an existing value
102
  * from the database and use the value for the form.
103
  */
104
+ $Author = get_post_meta( $post->ID, 'EWD_UFAQ_Post_Author', true );
105
 
106
+ if ($Author == "") {
107
  $User = wp_get_current_user();
108
+ $Author = $User->display_name;
109
  }
110
+ echo "Here's the total score: " . get_post_meta($post->ID, "FAQ_Total_Score", true) . "<br>";
111
  echo "<div class='ewd-ufaq-meta-field'>";
112
  echo "<label for='Post_Author'>";
113
  echo __( "Author Display Name:", 'EWD_UFAQ' );
114
  echo " </label>";
115
+ echo "<input type='text' id='ewd-ufaq-post-author' name='Post_Author' value='" . esc_attr( $Author ) . "' size='25' />";
116
  echo "</div>";
117
+
118
+ if ($FAQ_Ratings == "Yes") {
119
+ $Up_Votes = get_post_meta($post->ID, "FAQ_Up_Votes", true);
120
+ $Down_Votes = get_post_meta($post->ID, "FAQ_Down_Votes", true);
121
+
122
+ echo "<div class='ewd-ufaq-meta-field'>";
123
+ echo "<label for='Up_Votes'>";
124
+ echo __( "Up Votes:", 'EWD_UFAQ' );
125
+ echo " </label>";
126
+ echo "<input type='text' id='ewd-ufaq-up-votes' name='Up_Votes' value='" . esc_attr( $Up_Votes ) . "' size='25' />";
127
+ echo "</div>";
128
+ echo "<div class='ewd-ufaq-meta-field'>";
129
+ echo "<label for='Down_Votes'>";
130
+ echo __( "Down Votes:", 'EWD_UFAQ' );
131
+ echo " </label>";
132
+ echo "<input type='text' id='ewd-ufaq-down-votes' name='Down_Votes' value='" . esc_attr( $Down_Votes ) . "' size='25' />";
133
+ echo "</div>";
134
+ }
135
+
136
+ foreach ($FAQ_Fields_Array as $FAQ_Field_Item) {
137
+ echo "<div class='ewd-ufaq-meta-field'>";
138
+ echo "<label for='" . $FAQ_Field_Item['FieldName'] . "'>";
139
+ echo $FAQ_Field_Item['FieldName'] . ": ";
140
+ echo "</label>";
141
+ $Value = get_post_meta($post->ID, "Custom_Field_" . $FAQ_Field_Item['FieldID'], true);
142
+ if ($FAQ_Field_Item['FieldType'] == "text") {
143
+ echo "<input name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' id='ewd-ufaq-input-" . $FAQ_Field_Item['FieldID'] . "' class='ewd-ufaq-text-input' type='text' value='" . htmlspecialchars($Value, ENT_QUOTES) . "' size='60' />";
144
+ }
145
+ elseif ($FAQ_Field_Item['FieldType'] == "textarea") {
146
+ echo "<textarea name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' id='ewd-ufaq-input-" . $FAQ_Field_Item['FieldID'] . "' class='ewd-ufaq-textarea' cols='60' rows='6'>" . $Value . "</textarea>";
147
+ }
148
+ elseif ($FAQ_Field_Item['FieldType'] == "select") {
149
+ $Options = explode(",", $FAQ_Field_Item['FieldValues']);
150
+ echo "<select name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' id='ewd-ufaq-input-" . $FAQ_Field_Item['FieldID'] . "' class='ewd-ufaq-select'>";
151
+ foreach ($Options as $Option) {
152
+ echo "<option value='" . $Option . "' ";
153
+ if (trim($Option) == trim($Value)) {echo "selected='selected'";}
154
+ echo ">" . $Option . "</option>";
155
+ }
156
+ echo "</select>";
157
+ }
158
+ elseif ($FAQ_Field_Item['FieldType'] == "radio") {
159
+ $Counter = 0;
160
+ $Options = explode(",", $FAQ_Field_Item['FieldValues']);
161
+ echo "";
162
+ foreach ($Options as $Option) {
163
+ if ($Counter != 0) {echo "<label class='radio'></label>";}
164
+ echo "<input type='radio' name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' value='" . $Option . "' class='ewd-ufaq-radio' ";
165
+ if (trim($Option) == trim($Value)) {echo "checked";}
166
+ echo ">" . $Option;
167
+ $Counter++;
168
+ }
169
+ echo "";
170
+ }
171
+ elseif ($FAQ_Field_Item['FieldType'] == "checkbox") {
172
+ $Counter = 0;
173
+ $Options = explode(",", $FAQ_Field_Item['FieldValues']);
174
+ $Values = explode(",", $Value);
175
+ echo "";
176
+ foreach ($Options as $Option) {
177
+ if ($Counter != 0) {echo "<label class='radio'></label>";}
178
+ echo "<input type='checkbox' name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "[]' value='" . $Option . "' class='ewd-ufaq-checkbox' ";
179
+ if (in_array($Option, $Values)) {echo "checked";}
180
+ echo ">" . $Option . "</br>";
181
+ $Counter++;
182
+ }
183
+ echo "";
184
+ }
185
+ elseif ($FAQ_Field_Item['FieldType'] == "file") {
186
+ echo "<input name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' class='ewd-ufaq-file-input' type='file' value='" . $Value . "' /><br/>Current Filename: " . $Value . "";
187
+ }
188
+ elseif ($FAQ_Field_Item['FieldType'] == "date") {
189
+ echo "<input name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' class='ewd-ufaq-date-input' type='date' value='" . $Value . "' />";
190
+ }
191
+ elseif ($FAQ_Field_Item['FieldType'] == "datetime") {
192
+ echo "<input name='Custom_Field_" . $FAQ_Field_Item['FieldID'] . "' class='ewd-ufaq-datetime-input' type='datetime-local' value='" . $Value . "' />";
193
+ }
194
+ unset($Value);
195
+ echo "</div>";
196
+ }
197
  }
198
 
199
  add_action( 'save_post', 'EWD_UFAQ_Save_Meta_Box_Data' );
200
  function EWD_UFAQ_Save_Meta_Box_Data($post_id) {
201
+ $FAQ_Fields_Array = get_option("EWD_UFAQ_FAQ_Fields");
202
+ if (!is_array($FAQ_Fields_Array)) {$FAQ_Fields_Array = array();}
203
+ $FAQ_Ratings = get_option("EWD_UFAQ_FAQ_Ratings");
204
 
205
  /*
206
  * We need to verify this came from our screen and with proper authorization,
236
  }
237
  }
238
 
239
+ foreach ($FAQ_Fields_Array as $FAQ_Field_Item) {
240
+ $FieldName = "Custom_Field_" . $FAQ_Field_Item['FieldID'];
241
+ if (isset($_POST[$FieldName]) or isset($_FILES[$FieldName])) {
242
+ // If it's a file, pass back to Prepare_Data_For_Insertion.php to upload the file and get the name
243
+ if ($FAQ_Field_Item['FieldType'] == "file") {
244
+ $File_Upload_Return = EWD_UFAQ_Handle_File_Upload($FieldName);
245
+ if ($File_Upload_Return['Success'] == "No") {return $File_Upload_Return['Data'];}
246
+ elseif ($File_Upload_Return['Success'] == "N/A") {$NoFile = "Yes";}
247
+ else {$Value = $File_Upload_Return['Data'];}
248
+ }
249
+ elseif ($FAQ_Field_Item['FieldType'] == "checkbox") {
250
+ foreach ($_POST[$FieldName] as $SingleValue) {$Value .= trim($SingleValue) . ",";}
251
+ $Value = substr($Value, 0, strlen($Value)-1);
252
+ }
253
+ else {
254
+ $Value = stripslashes_deep(trim($_POST[$FieldName]));
255
+ $Options = explode(",", $FAQ_Field_Item['FieldValues']);
256
+ if (sizeOf($Options) > 0 and $Options[0] != "") {
257
+ array_walk($Options, create_function('&$val', '$val = trim($val);'));
258
+ $InArray = in_array($Value, $Options);
259
+ }
260
+ }
261
+ if (!isset($InArray) or $InArray) {
262
+ if ($NoFile != "Yes") {
263
+ update_post_meta($post_id, "Custom_Field_" . $FAQ_Field_Item['FieldID'], $Value);
264
+ }
265
+ }
266
+ elseif ($InArray == false) {$CustomFieldError = __(" One or more custom field values were incorrect.", 'EWD_UFAQ');}
267
+ unset($Value);
268
+ unset($InArray);
269
+ unset($NoFile);
270
+ unset($CombinedValue);
271
+ unset($FieldName);
272
+ }
273
  }
274
 
275
  // Sanitize user input.
278
  // Update the meta field in the database.
279
  update_post_meta( $post_id, 'EWD_UFAQ_Post_Author', $Post_Author );
280
 
281
+ if ($FAQ_Ratings == "Yes") {
282
+ update_post_meta($post_id, "FAQ_Up_Votes", sanitize_text_field($_POST['Up_Votes']));
283
+ update_post_meta($post_id, "FAQ_Down_Votes", sanitize_text_field($_POST['Down_Votes']));
284
+ update_post_meta($post_id, "FAQ_Total_Score", sanitize_text_field($_POST['Up_Votes']) - sanitize_text_field($_POST['Down_Votes']));
285
+ }
286
+ }
287
+
288
+ function EWD_UFAQ_Add_Edit_Form_Multipart_Encoding() {
289
+ global $post;
290
+
291
+ if(!$post) {return;}
292
+
293
+ $post_type = get_post_type($post->ID);
294
+
295
+ if ($post_type = "ufaq") {echo ' enctype="multipart/form-data"';}
296
+ }
297
+ add_action('post_edit_form_tag', 'EWD_UFAQ_Add_Edit_Form_Multipart_Encoding');
298
+
299
+ function EWD_UFAQ_Handle_File_Upload($Field_Name) {
300
+
301
+ if (!is_user_logged_in()) {exit();}
302
+
303
+ if (isset($_FILES[$Field_Name]) && ($_FILES[$Field_Name]['size'] > 0)) {
304
+ $uploaded_file = wp_handle_upload($_FILES[$Field_Name], array( 'test_form' => false ));
305
+ if (isset($uploaded_file['file'])) {
306
+ $Return['Success'] = "Yes";
307
+ $Return['Data'] = $uploaded_file['url'];
308
+ }
309
+ else {
310
+ $Return['Success'] = "No";
311
+ $Return['Data'] = "There was an error with the file upload";
312
+ }
313
+ }
314
+ else {
315
+ $Return['Success'] = "N/A";
316
+ $Return['Data'] = __('No file was uploaded.', 'UPCP');
317
+ }
318
+
319
+ return $Return;
320
  }
321
  ?>
Functions/Update_Admin_Databases.php CHANGED
@@ -45,9 +45,11 @@ function EWD_UFAQ_UpdateOptions() {
45
  if (isset($_POST['include_permalink'])) {update_option('EWD_UFAQ_Include_Permalink', $_POST['include_permalink']);}
46
  if (isset($_POST['permalink_type'])) {update_option('EWD_UFAQ_Permalink_Type', $_POST['permalink_type']);}
47
  if (isset($_POST['show_tinymce'])) {update_option('EWD_UFAQ_Show_TinyMCE', $_POST['show_tinymce']);}
 
48
 
49
  if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
50
  if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
 
51
  if (isset($_POST['woocommerce_faqs']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_WooCommerce_FAQs', $_POST['woocommerce_faqs']);}
52
  if (isset($_POST['use_product']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Use_Product', $_POST['use_product']);}
53
  if (isset($_POST['reveal_effect']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Reveal_Effect', $_POST['reveal_effect']);}
@@ -63,6 +65,25 @@ function EWD_UFAQ_UpdateOptions() {
63
  if (isset($_POST['order_by_setting'])) {update_option('EWD_UFAQ_Order_By', $_POST['order_by_setting']);}
64
  if (isset($_POST['order_setting'])) {update_option('EWD_UFAQ_Order', $_POST['order_setting']);}
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  if (isset($_POST['posted_label'])) {update_option('EWD_UFAQ_Posted_Label', $Posted_Label);}
67
  if (isset($_POST['by_label'])) {update_option('EWD_UFAQ_By_Label', $By_Label);}
68
  if (isset($_POST['on_label'])) {update_option('EWD_UFAQ_On_Label', $On_Label);}
@@ -115,6 +136,9 @@ function EWD_UFAQ_UpdateOptions() {
115
  if (isset($_POST['ufaq_styling_category_font_color'])) {update_option('EWD_UFAQ_Styling_Category_Font_Color', $_POST['ufaq_styling_category_font_color']);}
116
  if (isset($_POST['ufaq_styling_category_margin'])) {update_option('EWD_UFAQ_Styling_Category_Margin', $_POST['ufaq_styling_category_margin']);}
117
  if (isset($_POST['ufaq_styling_category_padding'])) {update_option('EWD_UFAQ_Styling_Category_Padding', $_POST['ufaq_styling_category_padding']);}
 
 
 
118
 
119
  if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
120
 
45
  if (isset($_POST['include_permalink'])) {update_option('EWD_UFAQ_Include_Permalink', $_POST['include_permalink']);}
46
  if (isset($_POST['permalink_type'])) {update_option('EWD_UFAQ_Permalink_Type', $_POST['permalink_type']);}
47
  if (isset($_POST['show_tinymce'])) {update_option('EWD_UFAQ_Show_TinyMCE', $_POST['show_tinymce']);}
48
+ if (isset($_POST['comments_on'])) {update_option('EWD_UFAQ_Comments_On', $_POST['comments_on']);}
49
 
50
  if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
51
  if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
52
+ if (isset($_POST['faq_ratings']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_FAQ_Ratings', $_POST['faq_ratings']);}
53
  if (isset($_POST['woocommerce_faqs']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_WooCommerce_FAQs', $_POST['woocommerce_faqs']);}
54
  if (isset($_POST['use_product']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Use_Product', $_POST['use_product']);}
55
  if (isset($_POST['reveal_effect']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Reveal_Effect', $_POST['reveal_effect']);}
65
  if (isset($_POST['order_by_setting'])) {update_option('EWD_UFAQ_Order_By', $_POST['order_by_setting']);}
66
  if (isset($_POST['order_setting'])) {update_option('EWD_UFAQ_Order', $_POST['order_setting']);}
67
 
68
+ $Counter = 0;
69
+ while ($Counter < 30) {
70
+ if (isset($_POST['Custom_Field_' . $Counter . '_Name'])) {
71
+ $Prefix = 'Custom_Field_' . $Counter;
72
+
73
+ $Custom_Field_Item['FieldID'] = sanitize_text_field($_POST[$Prefix . '_ID']);
74
+ $Custom_Field_Item['FieldName'] = sanitize_text_field($_POST[$Prefix . '_Name']);
75
+ $Custom_Field_Item['FieldType'] = sanitize_text_field($_POST[$Prefix . '_Type']);
76
+ $Custom_Field_Item['FieldValues'] = sanitize_text_field($_POST[$Prefix . '_Values']);
77
+
78
+ $Custom_Fields[] = $Custom_Field_Item;
79
+ unset($Custom_Field_Item);
80
+ }
81
+ $Counter++;
82
+ }
83
+ if (isset($_POST['Options_Submit'])) {update_option('EWD_UFAQ_FAQ_Fields', $Custom_Fields);}
84
+ if (isset($_POST['hide_blank_fields'])) {update_option('EWD_UFAQ_Hide_Blank_Fields', $_POST['hide_blank_fields']);}
85
+
86
+
87
  if (isset($_POST['posted_label'])) {update_option('EWD_UFAQ_Posted_Label', $Posted_Label);}
88
  if (isset($_POST['by_label'])) {update_option('EWD_UFAQ_By_Label', $By_Label);}
89
  if (isset($_POST['on_label'])) {update_option('EWD_UFAQ_On_Label', $On_Label);}
136
  if (isset($_POST['ufaq_styling_category_font_color'])) {update_option('EWD_UFAQ_Styling_Category_Font_Color', $_POST['ufaq_styling_category_font_color']);}
137
  if (isset($_POST['ufaq_styling_category_margin'])) {update_option('EWD_UFAQ_Styling_Category_Margin', $_POST['ufaq_styling_category_margin']);}
138
  if (isset($_POST['ufaq_styling_category_padding'])) {update_option('EWD_UFAQ_Styling_Category_Padding', $_POST['ufaq_styling_category_padding']);}
139
+
140
+ if (isset($_POST['ufaq_styling_category_heading_type'])) {update_option('EWD_UFAQ_Styling_Category_Heading_Type', $_POST['ufaq_styling_category_heading_type']);}
141
+ if (isset($_POST['ufaq_styling_faq_heading_type'])) {update_option('EWD_UFAQ_Styling_FAQ_Heading_Type', $_POST['ufaq_styling_faq_heading_type']);}
142
 
143
  if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
144
 
Main.php CHANGED
@@ -1,20 +1,20 @@
1
  <?php
2
  /*
3
- Plugin Name: Ultimate FAQ
4
  Plugin URI: http://www.EtoileWebDesign.com/wordpress-plugins/
5
  Description: A plugin that lets you create FAQs (frequently asked questions), organize them, publicize them, etc.
6
  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.3.5
11
  */
12
 
13
  global $ewd_ufaq_message;
14
  global $UFAQ_Full_Version;
15
  global $EWD_UFAQ_Version;
16
 
17
- $EWD_UFAQ_Version = '1.3.0';
18
 
19
  define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
20
  define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
@@ -127,9 +127,11 @@ function Set_EWD_UFAQ_Options() {
127
  if (get_option("EWD_UFAQ_Include_Permalink") == "") {update_option("EWD_UFAQ_Include_Permalink", "Yes");}
128
  if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
129
  if (get_option("EWD_UFAQ_Show_TinyMCE") == "") {update_option("EWD_UFAQ_Show_TinyMCE", "Yes");}
 
130
 
131
  if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
132
  if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
 
133
  if (get_option("EWD_UFAQ_WooCommerce_FAQs") == "") {update_option("EWD_UFAQ_WooCommerce_FAQs", "No");}
134
  if (get_option("EWD_UFAQ_Use_Product") == "") {update_option("EWD_UFAQ_Use_Product", "Yes");}
135
  if (get_option("EWD_UFAQ_Reveal_Effect") == "") {update_option("EWD_UFAQ_Reveal_Effect", "none");}
@@ -144,6 +146,11 @@ function Set_EWD_UFAQ_Options() {
144
  if (get_option("EWD_UFAQ_Order_By") == "") {update_option("EWD_UFAQ_Order_By", "date");}
145
  if (get_option("EWD_UFAQ_Order") == "") {update_option("EWD_UFAQ_Order", "DESC");}
146
 
 
 
 
 
 
147
  if (get_option("EWD_UFAQ_Full_Version") == "") {update_option("EWD_UFAQ_Full_Version", "No");}
148
  if (get_option("EWD_UFAQ_Install_Flag") == "") {update_option("EWD_UFAQ_Update_Flag", "Yes");}
149
  if (get_option("EWD_UFAQ_Install_Flag") == "") {update_option("EWD_UFAQ_Install_Flag", "Yes");}
@@ -219,6 +226,7 @@ include "Shortcodes/DisplayFAQs.php";
219
  include "Shortcodes/Display_FAQ_Search.php";
220
  include "Shortcodes/Display_Popular_FAQs.php";
221
  include "Shortcodes/Display_Recent_FAQs.php";
 
222
  include "Shortcodes/SelectFAQ.php";
223
  include "Shortcodes/SubmitFAQ.php";
224
 
1
  <?php
2
  /*
3
+ Plugin Name: FAQ
4
  Plugin URI: http://www.EtoileWebDesign.com/wordpress-plugins/
5
  Description: A plugin that lets you create FAQs (frequently asked questions), organize them, publicize them, etc.
6
  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.4.0
11
  */
12
 
13
  global $ewd_ufaq_message;
14
  global $UFAQ_Full_Version;
15
  global $EWD_UFAQ_Version;
16
 
17
+ $EWD_UFAQ_Version = '1.4.0';
18
 
19
  define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
20
  define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
127
  if (get_option("EWD_UFAQ_Include_Permalink") == "") {update_option("EWD_UFAQ_Include_Permalink", "Yes");}
128
  if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
129
  if (get_option("EWD_UFAQ_Show_TinyMCE") == "") {update_option("EWD_UFAQ_Show_TinyMCE", "Yes");}
130
+ if (get_option("EWD_UFAQ_Comments_On") == "") {update_option("EWD_UFAQ_Comments_On", "Yes");}
131
 
132
  if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
133
  if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
134
+ if (get_option("EWD_UFAQ_FAQ_Ratings") == "") {update_option("EWD_UFAQ_FAQ_Ratings", "No");}
135
  if (get_option("EWD_UFAQ_WooCommerce_FAQs") == "") {update_option("EWD_UFAQ_WooCommerce_FAQs", "No");}
136
  if (get_option("EWD_UFAQ_Use_Product") == "") {update_option("EWD_UFAQ_Use_Product", "Yes");}
137
  if (get_option("EWD_UFAQ_Reveal_Effect") == "") {update_option("EWD_UFAQ_Reveal_Effect", "none");}
146
  if (get_option("EWD_UFAQ_Order_By") == "") {update_option("EWD_UFAQ_Order_By", "date");}
147
  if (get_option("EWD_UFAQ_Order") == "") {update_option("EWD_UFAQ_Order", "DESC");}
148
 
149
+ if (get_option("EWD_UFAQ_Hide_Blank_Fields") == "") {update_option("EWD_UFAQ_Hide_Blank_Fields", "Yes");}
150
+
151
+ if (get_option("EWD_UFAQ_Styling_Category_Heading_Type") == "") {update_option("EWD_UFAQ_Styling_Category_Heading_Type", "h4");}
152
+ if (get_option("EWD_UFAQ_Styling_FAQ_Heading_Type") == "") {update_option("EWD_UFAQ_Styling_FAQ_Heading_Type", "h4");}
153
+
154
  if (get_option("EWD_UFAQ_Full_Version") == "") {update_option("EWD_UFAQ_Full_Version", "No");}
155
  if (get_option("EWD_UFAQ_Install_Flag") == "") {update_option("EWD_UFAQ_Update_Flag", "Yes");}
156
  if (get_option("EWD_UFAQ_Install_Flag") == "") {update_option("EWD_UFAQ_Install_Flag", "Yes");}
226
  include "Shortcodes/Display_FAQ_Search.php";
227
  include "Shortcodes/Display_Popular_FAQs.php";
228
  include "Shortcodes/Display_Recent_FAQs.php";
229
+ include "Shortcodes/Display_Top_Rated_FAQs.php";
230
  include "Shortcodes/SelectFAQ.php";
231
  include "Shortcodes/SubmitFAQ.php";
232
 
Shortcodes/DisplayFAQs.php CHANGED
@@ -15,9 +15,11 @@ function Display_FAQs($atts) {
15
  $Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
16
  $Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
17
  $Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
 
18
 
19
  $Display_Style = get_option("EWD_UFAQ_Display_Style");
20
  $Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
 
21
  $Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
22
  $Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
23
  $Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
@@ -29,6 +31,10 @@ function Display_FAQs($atts) {
29
  $Group_By_Order = get_option("EWD_UFAQ_Group_By_Order");
30
  $Order_By_Setting = get_option("EWD_UFAQ_Order_By");
31
  $Order_Setting = get_option("EWD_UFAQ_Order");
 
 
 
 
32
 
33
  $Posted_Label = get_option("EWD_UFAQ_Posted_Label");
34
  if ($Posted_Label == "") {$Posted_Label = __("Posted ", 'EWD_UFAQ');}
@@ -43,6 +49,9 @@ function Display_FAQs($atts) {
43
  $Permalink_Label = get_option("EWD_UFAQ_Permalink_Label");
44
  if ($Permalink_Label == "") {$Permalink_Label = __("Permalink", 'EWD_UFAQ');}
45
 
 
 
 
46
  if ($Display_Style != "Color_Block") {$Color_Block_Shape = "";}
47
  else {$Color_Block_Shape = "ewd-ufaq-" . $Color_Block_Shape;}
48
 
@@ -55,8 +64,10 @@ function Display_FAQs($atts) {
55
  // Get the attributes passed by the shortcode, and store them in new variables for processing
56
  extract( shortcode_atts( array(
57
  'search_string' => "",
 
58
  'include_category' => "",
59
  'exclude_category' => "",
 
60
  'orderby' => "",
61
  'order' => "",
62
  'ajax' => "No",
@@ -70,15 +81,21 @@ function Display_FAQs($atts) {
70
  $search_string = strtolower($search_string);
71
 
72
  if ($display_all_answers != "") {$Display_All_Answers = $display_all_answers;}
 
 
 
 
 
73
 
74
  if ($orderby == "") {$orderby = $Order_By_Setting;}
75
- if ($orderby == "popular" or $orderby == "set_order") {
76
  $orig_order_setting = $orderby;
77
  $orderby = "meta_value_num";
78
  }
79
 
80
  if ($order == "") {$order = $Order_Setting;}
81
  if ($orig_order_setting == "popular") {$order = "DESC";}
 
82
  if ($orig_order_setting == "set_order") {$order = "ASC";}
83
 
84
  if ($Group_By_Category == "Yes") {
@@ -175,7 +192,9 @@ function Display_FAQs($atts) {
175
  );
176
  unset($tax_query_array);
177
  if ($search_string != "") {$params['s'] = $search_string;}
 
178
  if ($orig_order_setting == "popular") {$params['meta_key'] = 'ufaq_view_count';}
 
179
  if ($orig_order_setting == "set_order") {$params['meta_key'] = 'ufaq_order';}
180
  $FAQ_Query = new WP_Query($params);
181
 
@@ -184,7 +203,7 @@ function Display_FAQs($atts) {
184
  $ReturnString .= "<div class='ufaq-faq-category-title";
185
  if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-title-toggle";}
186
  $ReturnString .= "' data-categoryid='" . $Category->term_id . "'>";
187
- $ReturnString .= "<h4>" . $Category->name . "</h4>";
188
  $ReturnString .= "</div>";
189
  $ReturnString .= "<div class='ufaq-faq-category-inner";
190
  if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-body-hidden";}
@@ -192,7 +211,7 @@ function Display_FAQs($atts) {
192
 
193
  $HeaderString .= "<div class='ufaq-faq-header-category'>";
194
  $HeaderString .= "<div class='ufaq-faq-header-category-title' data-categoryid='" . $Category->term_id . "'>";
195
- $HeaderString .= "<h4>" . $Category->name . "</h4>";
196
  $HeaderString .= "</div>";
197
  }
198
 
@@ -225,7 +244,7 @@ function Display_FAQs($atts) {
225
  $ReturnString .= "<a class='ewd-ufaq-post-margin' href='" . get_permalink($faq->ID) . "'><div class='ewd-ufaq-post-margin-symbol " . $Color_Block_Shape . "' id='ewd-ufaq-post-margin-symbol-" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "'><span id='ewd-ufaq-post-symbol-" . $Unique_ID . "-" . $faq->ID . "-" . $Counter;
226
  if ($Display_All_Answers == "Yes") {$ReturnString .= "'> - </span></div>";}
227
  else {$ReturnString .= "'> + </span></div>";}
228
- $ReturnString .= "<div class='ufaq-faq-title-text'><h4>" .$faq->post_title . "</h4></div><div class='ewd-ufaq-clear'></div></a>";
229
  $ReturnString .= "</div>";
230
 
231
  if (strlen($faq->post_excerpt) > 0) {$ReturnString .= "<div class='ufaq-faq-excerpt' id='ufaq-excerpt-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_excerpt)) . "</div>";}
@@ -244,7 +263,24 @@ function Display_FAQs($atts) {
244
  }
245
 
246
  $ReturnString .= "<div class='ewd-ufaq-post-margin ufaq-faq-post' id='ufaq-post-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_content)) . "</div>";
247
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  if ($Hide_Categories == "No" and sizeOf($Category_Terms) > 0) {
249
  $ReturnString .= "<div class='ufaq-faq-categories' id='ufaq-categories-" . $faq->ID . "'>";
250
  if ($Category_Label == ""){
@@ -274,6 +310,22 @@ function Display_FAQs($atts) {
274
  if (sizeOf($Tag_Terms) > 0) {$ReturnString = substr($ReturnString, 0, strlen($ReturnString)-2);}
275
  $ReturnString .= "</div>";
276
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
  if ($Socialmedia[0] != "Blank" and $Socialmedia[0] != "") {
279
  $ReturnString .= "<div class='ufaq-social-links'>Share: ";
@@ -298,6 +350,15 @@ function Display_FAQs($atts) {
298
  $ReturnString .= "</div>";
299
  }
300
 
 
 
 
 
 
 
 
 
 
301
  if ($Display_Back_To_Top == "Yes") {
302
  $ReturnString .= "<div class='ufaq-back-to-top'>";
303
  $ReturnString .= "<a class='ufaq-back-to-top-link'>";
15
  $Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
16
  $Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
17
  $Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
18
+ $Comments_On = get_option("EWD_UFAQ_Comments_On");
19
 
20
  $Display_Style = get_option("EWD_UFAQ_Display_Style");
21
  $Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
22
+ $FAQ_Ratings = get_option("EWD_UFAQ_FAQ_Ratings");
23
  $Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
24
  $Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
25
  $Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
31
  $Group_By_Order = get_option("EWD_UFAQ_Group_By_Order");
32
  $Order_By_Setting = get_option("EWD_UFAQ_Order_By");
33
  $Order_Setting = get_option("EWD_UFAQ_Order");
34
+
35
+ $FAQ_Fields_Array = get_option("EWD_UFAQ_FAQ_Fields");
36
+ if (!is_array($FAQ_Fields_Array)) {$FAQ_Fields_Array = array();}
37
+ $Hide_Blank_Fields = get_option("EWD_UFAQ_Hide_Blank_Fields");
38
 
39
  $Posted_Label = get_option("EWD_UFAQ_Posted_Label");
40
  if ($Posted_Label == "") {$Posted_Label = __("Posted ", 'EWD_UFAQ');}
49
  $Permalink_Label = get_option("EWD_UFAQ_Permalink_Label");
50
  if ($Permalink_Label == "") {$Permalink_Label = __("Permalink", 'EWD_UFAQ');}
51
 
52
+ $UFAQ_Styling_Category_Heading_Type = get_option("EWD_UFAQ_Styling_Category_Heading_Type");
53
+ $UFAQ_Styling_FAQ_Heading_Type = get_option("EWD_UFAQ_Styling_FAQ_Heading_Type");
54
+
55
  if ($Display_Style != "Color_Block") {$Color_Block_Shape = "";}
56
  else {$Color_Block_Shape = "ewd-ufaq-" . $Color_Block_Shape;}
57
 
64
  // Get the attributes passed by the shortcode, and store them in new variables for processing
65
  extract( shortcode_atts( array(
66
  'search_string' => "",
67
+ 'post__in' => "",
68
  'include_category' => "",
69
  'exclude_category' => "",
70
+ 'no_comments' => "",
71
  'orderby' => "",
72
  'order' => "",
73
  'ajax' => "No",
81
  $search_string = strtolower($search_string);
82
 
83
  if ($display_all_answers != "") {$Display_All_Answers = $display_all_answers;}
84
+
85
+ if ($post__in != "") {
86
+ $post_id_array = json_decode(str_replace(array("&lsqb;", "&rsqb;"), array("[", "]"), $post__in));
87
+ }
88
+ else {$post_id_array = "";}
89
 
90
  if ($orderby == "") {$orderby = $Order_By_Setting;}
91
+ if ($orderby == "popular" or $orderby == "set_order" or $orderby == "top_rated") {
92
  $orig_order_setting = $orderby;
93
  $orderby = "meta_value_num";
94
  }
95
 
96
  if ($order == "") {$order = $Order_Setting;}
97
  if ($orig_order_setting == "popular") {$order = "DESC";}
98
+ if ($orig_order_setting == "top_rated") {$order = "DESC";}
99
  if ($orig_order_setting == "set_order") {$order = "ASC";}
100
 
101
  if ($Group_By_Category == "Yes") {
192
  );
193
  unset($tax_query_array);
194
  if ($search_string != "") {$params['s'] = $search_string;}
195
+ if (is_array($post_id_array)) {$params['post__in'] = $post_id_array;}
196
  if ($orig_order_setting == "popular") {$params['meta_key'] = 'ufaq_view_count';}
197
+ if ($orig_order_setting == "top_rated") {$params['meta_key'] = 'FAQ_Total_Score';}
198
  if ($orig_order_setting == "set_order") {$params['meta_key'] = 'ufaq_order';}
199
  $FAQ_Query = new WP_Query($params);
200
 
203
  $ReturnString .= "<div class='ufaq-faq-category-title";
204
  if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-title-toggle";}
205
  $ReturnString .= "' data-categoryid='" . $Category->term_id . "'>";
206
+ $ReturnString .= "<" . $UFAQ_Styling_Category_Heading_Type . ">" . $Category->name . "</" . $UFAQ_Styling_Category_Heading_Type . ">";
207
  $ReturnString .= "</div>";
208
  $ReturnString .= "<div class='ufaq-faq-category-inner";
209
  if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-body-hidden";}
211
 
212
  $HeaderString .= "<div class='ufaq-faq-header-category'>";
213
  $HeaderString .= "<div class='ufaq-faq-header-category-title' data-categoryid='" . $Category->term_id . "'>";
214
+ $HeaderString .= "<" . $UFAQ_Styling_Category_Heading_Type . ">" . $Category->name . "</" . $UFAQ_Styling_Category_Heading_Type . ">";
215
  $HeaderString .= "</div>";
216
  }
217
 
244
  $ReturnString .= "<a class='ewd-ufaq-post-margin' href='" . get_permalink($faq->ID) . "'><div class='ewd-ufaq-post-margin-symbol " . $Color_Block_Shape . "' id='ewd-ufaq-post-margin-symbol-" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "'><span id='ewd-ufaq-post-symbol-" . $Unique_ID . "-" . $faq->ID . "-" . $Counter;
245
  if ($Display_All_Answers == "Yes") {$ReturnString .= "'> - </span></div>";}
246
  else {$ReturnString .= "'> + </span></div>";}
247
+ $ReturnString .= "<div class='ufaq-faq-title-text'><" . $UFAQ_Styling_FAQ_Heading_Type . ">" .$faq->post_title . "</" . $UFAQ_Styling_FAQ_Heading_Type . "></div><div class='ewd-ufaq-clear'></div></a>";
248
  $ReturnString .= "</div>";
249
 
250
  if (strlen($faq->post_excerpt) > 0) {$ReturnString .= "<div class='ufaq-faq-excerpt' id='ufaq-excerpt-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_excerpt)) . "</div>";}
263
  }
264
 
265
  $ReturnString .= "<div class='ewd-ufaq-post-margin ufaq-faq-post' id='ufaq-post-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_content)) . "</div>";
266
+
267
+ if (sizeOf($FAQ_Fields_Array) > 0) {
268
+ $ReturnString .= "<div class='ufaq-faq-custom-fields' id='ufaq-custom-fields-" . $faq->ID . "'>";
269
+ foreach ($FAQ_Fields_Array as $FAQ_Field_Item) {
270
+ $Value = get_post_meta($faq->ID, "Custom_Field_" . $FAQ_Field_Item['FieldID'], true);
271
+ if ($Hide_Blank_Fields != "Yes" or $Value != "") {
272
+ $ReturnString .= "<div class='ufaq-custom-field-label'>" . $FAQ_Field_Item['FieldName'] . ": </div>";
273
+ $ReturnString .= "<div class='ufaq-custom-field-value'>&nbsp;";
274
+ if ($FAQ_Field_Item['FieldType'] == "file") {$ReturnString .= "<a href='" . $Value . "'>" . substr($Value, strrpos($Value, "/"+1)) . "</a>";}
275
+ else {$ReturnString .= $Value;}
276
+ $ReturnString .= "</div>";
277
+ $ReturnString .= "<div class='ewd-ufaq-clear'></div>";
278
+ }
279
+ unset($Value);
280
+ }
281
+ $ReturnString .= "</div>";
282
+ }
283
+
284
  if ($Hide_Categories == "No" and sizeOf($Category_Terms) > 0) {
285
  $ReturnString .= "<div class='ufaq-faq-categories' id='ufaq-categories-" . $faq->ID . "'>";
286
  if ($Category_Label == ""){
310
  if (sizeOf($Tag_Terms) > 0) {$ReturnString = substr($ReturnString, 0, strlen($ReturnString)-2);}
311
  $ReturnString .= "</div>";
312
  }
313
+
314
+ if ($FAQ_Ratings == "Yes") {
315
+ $Up_Votes = get_post_meta($faq->ID, "FAQ_Up_Votes", true);
316
+ if ($Up_Votes == "") {$Up_Votes = 0;}
317
+ $Down_Votes = get_post_meta($faq->ID, "FAQ_Down_Votes", true);
318
+ if ($Down_Votes == "") {$Down_Votes = 0;}
319
+
320
+ $ReturnString .= "<div class='ewd-ufaq-ratings'>";
321
+ $ReturnString .= "<div class='ewd-ufaq-ratings-label'>";
322
+ $ReturnString .= __("Did you find this FAQ helpful?", 'EWD_UFAQ');
323
+ $ReturnString .= "</div>";
324
+ $ReturnString .= "<div class='ewd-ufaq-rating-button ewd-ufaq-up-vote' data-ratingfaqid='" . $faq->ID . "'>" . $Up_Votes . "</div>";
325
+ $ReturnString .= "<div class='ewd-ufaq-rating-button ewd-ufaq-down-vote' data-ratingfaqid='" . $faq->ID . "'>" . $Down_Votes . "</div>";
326
+ $ReturnString .= "</div>";
327
+ $ReturnString .= "<div class='ewd-ufaq-clear'></div>";
328
+ }
329
 
330
  if ($Socialmedia[0] != "Blank" and $Socialmedia[0] != "") {
331
  $ReturnString .= "<div class='ufaq-social-links'>Share: ";
350
  $ReturnString .= "</div>";
351
  }
352
 
353
+ if (comments_open($faq->ID) and $no_comments != "Yes" and $Comments_On == "Yes") {
354
+ ob_start();
355
+ $Comments = get_comments(array('post_id' => $faq->ID));
356
+ wp_list_comments(array(), $Comments);
357
+ comment_form(array(), $faq->ID);
358
+ $ReturnString .= ob_get_contents();
359
+ ob_end_clean();
360
+ }
361
+
362
  if ($Display_Back_To_Top == "Yes") {
363
  $ReturnString .= "<div class='ufaq-back-to-top'>";
364
  $ReturnString .= "<a class='ufaq-back-to-top-link'>";
Shortcodes/Display_Popular_FAQs.php CHANGED
@@ -3,11 +3,12 @@
3
  * supplied in the product-catalog shortcode */
4
  function Display_Popular_FAQs($atts) {
5
  extract( shortcode_atts( array(
 
6
  'post_count'=>5),
7
  $atts
8
  )
9
  );
10
- $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." orderby='popular']");
11
 
12
  return $ReturnString;
13
  }
3
  * supplied in the product-catalog shortcode */
4
  function Display_Popular_FAQs($atts) {
5
  extract( shortcode_atts( array(
6
+ 'no_comments' => "",
7
  'post_count'=>5),
8
  $atts
9
  )
10
  );
11
+ $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." no_comments='" . $no_comments . "' orderby='popular']");
12
 
13
  return $ReturnString;
14
  }
Shortcodes/Display_Recent_FAQs.php CHANGED
@@ -3,11 +3,12 @@
3
  * supplied in the product-catalog shortcode */
4
  function Display_Recent_FAQs($atts) {
5
  extract( shortcode_atts( array(
 
6
  'post_count'=>5),
7
  $atts
8
  )
9
  );
10
- $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." orderby='date']");
11
 
12
  return $ReturnString;
13
  }
3
  * supplied in the product-catalog shortcode */
4
  function Display_Recent_FAQs($atts) {
5
  extract( shortcode_atts( array(
6
+ 'no_comments' => "",
7
  'post_count'=>5),
8
  $atts
9
  )
10
  );
11
+ $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." no_comments='" . $no_comments . "' orderby='date']");
12
 
13
  return $ReturnString;
14
  }
Shortcodes/Display_Top_Rated_FAQs.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* The function that creates the HTML on the front-end, based on the parameters
3
+ * supplied in the product-catalog shortcode */
4
+ function Display_Top_Rated_FAQs($atts) {
5
+ extract( shortcode_atts( array(
6
+ 'no_comments' => "",
7
+ 'post_count'=>5),
8
+ $atts
9
+ )
10
+ );
11
+ $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." no_comments='" . $no_comments . "' orderby='top_rated']");
12
+
13
+ return $ReturnString;
14
+ }
15
+ add_shortcode("top-rated-faqs", "Display_Top_Rated_FAQs");
16
+
17
+ ?>
Shortcodes/SelectFAQ.php CHANGED
@@ -2,47 +2,25 @@
2
  /* The function that creates the HTML on the front-end, based on the parameters
3
  * supplied in the product-catalog shortcode */
4
  function Display_Select_FAQs($atts) {
5
- $current_url = $_SERVER['REQUEST_URI'];
6
- $Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
7
- $FAQ_Toggle = get_option("EWD_UFAQ_Toggle");
8
- $FAQ_Accordion = get_option("EWD_UFAQ_FAQ_Accordion");
9
- $Hide_Categories = get_option("EWD_UFAQ_Hide_Categories");
10
- $Hide_Tags = get_option("EWD_UFAQ_Hide_Tags");
11
- $Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
12
- $Group_By_Category = get_option("EWD_UFAQ_Group_By_Category");
13
- $Group_By_Order_By = get_option("EWD_UFAQ_Group_By_Order_By");
14
- $Group_By_Order = get_option("EWD_UFAQ_Group_By_Order");
15
- $Order_By_Setting = get_option("EWD_UFAQ_Order_By");
16
- $Order_Setting = get_option("EWD_UFAQ_Order");
17
- $Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
18
- $Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
19
- $Display_Style = get_option("EWD_UFAQ_Display_Style");
20
- $Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
21
- $Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
22
- $Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
23
- $Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
24
- $Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
25
- $Socialmedia = explode(",", $Socialmedia_String);
26
- $Display_Author = get_option("EWD_UFAQ_Display_Author");
27
- $Display_Date = get_option("EWD_UFAQ_Display_Date");
28
- $Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
29
-
30
  $ReturnString = "";
31
- $Back_To_Top_Label = get_option("EWD_UFAQ_Back_To_Top_Label");
32
- if ($Back_To_Top_Label == "") {$Back_To_Top_Label = __("Back to Top", 'EWD_UFAQ');}
33
 
34
- // Get the attributes passed by the shortcode, and store them in new variables for processing
35
  extract( shortcode_atts( array(
36
  'faq_name' => "",
37
  'faq_slug' => "",
38
- 'faq_id' => ""),
 
39
  $atts
40
  )
41
  );
42
 
43
- $name_array = explode(",", $faq_name);
44
- $slug_array = explode(",", $faq_slug);
45
- $id_array = explode(",", $faq_id);
 
 
 
 
 
46
 
47
  foreach ($name_array as $post_name) {
48
  $single_post = get_page_by_title($post_name, "OBJECT", "ufaq");
@@ -57,142 +35,9 @@ function Display_Select_FAQs($atts) {
57
  foreach ($id_array as $post_id) {
58
  $post_id_array[] = $post_id;
59
  }
60
-
61
- $params = array(
62
- 'posts_per_page' => -1,
63
- 'post_type' => 'ufaq',
64
- 'include' => $post_id_array
65
- );
66
- $faqs = get_posts($params);
67
-
68
- if ($Custom_CSS != "") {$ReturnString .= "<style>" . $Custom_CSS . "</style>";}
69
- $ReturnString .= EWD_UFAQ_Add_Modified_Styles();
70
-
71
- $ReturnString .= "<script language='JavaScript' type='text/javascript'>";
72
- if ($FAQ_Accordion == "Yes") {$ReturnString .= "var faq_accordion = true;";}
73
- else {$ReturnString .= "var faq_accordion = false;";}
74
- if ($Scroll_To_Top == "Yes") {$ReturnString .= "var faq_scroll = true;";}
75
- else {$ReturnString .= "var faq_scroll = false;";}
76
- $ReturnString .= "var reveal_effect = '" . $Reveal_Effect . "';";
77
- $ReturnString .= "</script>";
78
-
79
- $ReturnString .= "<div class='ufaq-faq-list' id='ufaq-faq-list'>";
80
- $Counter = 0;
81
- foreach ($faqs as $faq) {
82
- $Category_Terms = wp_get_post_terms($faq->ID, 'ufaq-category');
83
- $Tag_Terms = wp_get_post_terms($faq->ID, 'ufaq-tag');
84
-
85
- if ($Permalink_Type == "IndividualPage") {
86
- $FAQ_Permalink = get_permalink($faq->ID);
87
- }
88
- else {
89
- if ($Pretty_Permalinks == "Yes") {$FAQ_Permalink = get_the_permalink() . "single-faq/" . $faq->post_name;}
90
- else {$FAQ_Permalink = get_the_permalink() . "?Display_FAQ=" . $faq->ID;}
91
- }
92
-
93
- if ($Display_FAQ_ID == $faq->ID) {
94
- $ReturnString = str_replace("%Counter_Placeholder%", $Counter, $ReturnString);
95
- $Display_FAQ_ID = "";
96
- }
97
-
98
- $TitlesArray[] = json_encode($faq->post_title);
99
- $HeaderString .= "<div class='ufaq-faq-header-title'><a href='' class='ufaq-faq-header-link' data-postid='" . $faq->ID . "-" . $Counter . "'>" . $faq->post_title . "</a></div>";
100
-
101
- $ReturnString .= "<div class='ufaq-faq-div ufaq-faq-display-style-" . $Display_Style . " id='ufaq-post-" . $faq->ID . "-" . $Counter . "' data-postid='" . $faq->ID . "-" . $Counter . "'>";
102
-
103
- $ReturnString .= "<div class='ufaq-faq-title";
104
- if ($FAQ_Toggle != "No") {$ReturnString .= " ufaq-faq-toggle";}
105
- $ReturnString .= "' id='ufaq-title-" . $faq->ID . "' data-postid='" . $faq->ID . "-" . $Counter . "'>";
106
- $ReturnString .= "<a class='ewd-ufaq-post-margin' href='" . get_permalink($faq->ID) . "'><div class='ewd-ufaq-post-margin-symbol " . $Color_Block_Shape . "' id='ewd-ufaq-post-margin-symbol-" . $faq->ID . "-" . $Counter . "'><span id='ewd-ufaq-post-symbol-" . $faq->ID . "-" . $Counter;
107
- if ($Display_All_Answers == "Yes") {$ReturnString .= "'> - </span></div>";}
108
- else {$ReturnString .= "'> + </span></div>";}
109
- $ReturnString .= "<div class='ufaq-faq-title-text'><h4>" .$faq->post_title . "</h4></div><div class='ewd-ufaq-clear'></div></a>";
110
- $ReturnString .= "</div>";
111
-
112
- if (strlen($faq->post_excerpt) > 0) {$ReturnString .= "<div class='ufaq-faq-excerpt' id='ufaq-excerpt-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_excerpt)) . "</div>";}
113
- $ReturnString .= "<div class='ufaq-faq-body ufaq-body-" . $faq->ID;
114
- if ($Display_All_Answers != "Yes") {$ReturnString .= " ewd-ufaq-hidden";}
115
- $ReturnString .= "' id='ufaq-body-" . $faq->ID . "-" . $Counter . "'>";
116
-
117
- if ($Display_Author == "Yes" or $Display_Date == "Yes") {
118
- $Display_Author_Value = get_post_meta($faq->ID, "EWD_UFAQ_Post_Author", true);
119
- $Display_Date_Value = get_the_date("", $faq->ID);
120
- $ReturnString .= "<div class='ewd-ufaq-author-date'>";
121
- $ReturnString .= $Posted_Label . " " ;
122
- if ($Display_Author == "Yes" and $Display_Author_Value != "") {$ReturnString .= $By_Label . " <span class='ewd-ufaq-author'>" . $Display_Author_Value . "</span> ";}
123
- if ($Display_Date == "Yes") {$ReturnString .= $On_Label . " <span class='ewd-ufaq-date'>" . $Display_Date_Value . "</span> ";}
124
- $ReturnString .= "</div>";
125
- }
126
-
127
- $ReturnString .= "<div class='ewd-ufaq-post-margin ufaq-faq-post' id='ufaq-post-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_content)) . "</div>";
128
-
129
- if ($Hide_Categories == "No") {
130
- $ReturnString .= "<div class='ufaq-faq-categories' id='ufaq-categories-" . $faq->ID . "'>";
131
- if ($Category_Label == ""){
132
- if (sizeOf($Category_Terms) > 1) {$ReturnString .= "Categories: ";}
133
- else {$ReturnString .= "Category: ";}}
134
- else {$ReturnString .= $Category_Label . ": ";}
135
- foreach ($Category_Terms as $Category_Term) {
136
- if ($Pretty_Permalinks == "Yes") {$Category_URL = $current_url . "faq-category/" . $Category_Term->slug . "/";}
137
- else {$Category_URL = $current_url . "?include_category=" . $Category_Term->slug;}
138
- $ReturnString .= "<a href='" . $Category_URL ."'>" .$Category_Term->name . "</a>, ";
139
- }
140
- if (sizeOf($Category_Terms) > 0) {$ReturnString = substr($ReturnString, 0, strlen($ReturnString)-2);}
141
- $ReturnString .= "</div>";
142
- }
143
-
144
- if ($Hide_Tags == "No") {
145
- $ReturnString .= "<div class='ufaq-faq-tags' id='ufaq-tags-" . $faq->ID . "'>";
146
- if ($Tag_Label == ""){
147
- if (sizeOf($Tag_Terms) > 1) {$ReturnString .= "Tags: ";}
148
- else {$ReturnString .= "Tag: ";}}
149
- else {$ReturnString .= $Tag_Label . ": ";}
150
- foreach ($Tag_Terms as $Tag_Term) {
151
- if ($Pretty_Permalinks == "Yes") {$Tag_URL = $current_url . "faq-tag/" . $Tag_Term->slug . "/";}
152
- else {$Tag_URL = $current_url . "?include_tag=" . $Tag_Term->slug;}
153
- $ReturnString .= "<a href='" . $Tag_URL . "'>" .$Tag_Term->name . "</a>, ";
154
- }
155
- if (sizeOf($Tag_Terms) > 0) {$ReturnString = substr($ReturnString, 0, strlen($ReturnString)-2);}
156
- $ReturnString .= "</div>";
157
- }
158
-
159
- if ($Socialmedia[0] != "Blank" and $Socialmedia[0] != "") {
160
- $ReturnString .= "<div class='ufaq-social-links'>Share: ";
161
- $ReturnString .= "<ul class='rrssb-buttons'>";
162
- }
163
- if(in_array("Facebook", $Socialmedia)) {$ReturnString .= EWD_UFAQ_Add_Social_Media_Buttons("Facebook", $FAQ_Permalink, $faq->post_title);}
164
- if(in_array("Google", $Socialmedia)) {$ReturnString .= EWD_UFAQ_Add_Social_Media_Buttons("Google", $FAQ_Permalink, $faq->post_title);}
165
- if(in_array("Twitter", $Socialmedia)) {$ReturnString .= EWD_UFAQ_Add_Social_Media_Buttons("Twitter", $FAQ_Permalink, $faq->post_title);}
166
- if(in_array("Linkedin", $Socialmedia)) {$ReturnString .= EWD_UFAQ_Add_Social_Media_Buttons("Linkedin", $FAQ_Permalink, $faq->post_title);}
167
- if(in_array("Pinterest", $Socialmedia)) {$ReturnString .= EWD_UFAQ_Add_Social_Media_Buttons("Pinterest", $FAQ_Permalink, $faq->post_title);}
168
- if(in_array("Email", $Socialmedia)) {$ReturnString .= EWD_UFAQ_Add_Social_Media_Buttons("Email", $FAQ_Permalink, $faq->post_title);}
169
- if ($Socialmedia[0] != "Blank" and $Socialmedia[0] != "") {
170
- $ReturnString .= "</ul>";
171
- $ReturnString .= "</div>";
172
- }
173
-
174
- if ($Include_Permalink == "Yes" and $ajax == "No") {
175
- $ReturnString .= "<div class='ufaq-permalink'>Permalink: ";
176
- $ReturnString .= "<a href='" . $FAQ_Permalink . "'>";
177
- $ReturnString .= "<div class='ufaq-permalink-image'></div>";
178
- $ReturnString .= "</a>";
179
- $ReturnString .= "</div>";
180
- }
181
-
182
- if ($Display_Back_To_Top == "Yes") {
183
- $ReturnString .= "<div class='ufaq-back-to-top'>";
184
- $ReturnString .= "<a class='ufaq-back-to-top-link'>";
185
- $ReturnString .= $Back_To_Top_Label;
186
- $ReturnString .= "</a>";
187
- $ReturnString .= "</div>";
188
- }
189
-
190
- $ReturnString .= "</div>";
191
- $ReturnString .= "</div>";
192
-
193
- $Counter++;
194
- }
195
- $ReturnString .= "</div>";
196
 
197
  return $ReturnString;
198
  }
2
  /* The function that creates the HTML on the front-end, based on the parameters
3
  * supplied in the product-catalog shortcode */
4
  function Display_Select_FAQs($atts) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  $ReturnString = "";
 
 
6
 
 
7
  extract( shortcode_atts( array(
8
  'faq_name' => "",
9
  'faq_slug' => "",
10
+ 'faq_id' => "",
11
+ 'no_comments' => ""),
12
  $atts
13
  )
14
  );
15
 
16
+ if ($faq_name != "") {$name_array = explode(",", $faq_name);}
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();
24
 
25
  foreach ($name_array as $post_name) {
26
  $single_post = get_page_by_title($post_name, "OBJECT", "ufaq");
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));
40
+ if (!empty($post_id_array)) {$ReturnString = do_shortcode("[ultimate-faqs post__in='" . $json_ids . "' no_comments='" . $no_comments . "']");}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  return $ReturnString;
43
  }
css/Admin.css CHANGED
@@ -56,7 +56,7 @@
56
  color: #29324e;
57
  background-color: rgba(199,199,199, 0.5);
58
  box-shadow: inset 2px 0 0 #1188cc;
59
-
60
  }
61
 
62
  .ufaq-options-submenu-div {
@@ -95,6 +95,7 @@
95
  padding: 3px;
96
  }
97
 
 
98
  @media only screen and (max-width: 650px) {
99
  .ufaq-options-page-tabbed,
100
  .ufaq-styling-page-tabbed{
@@ -214,4 +215,16 @@ flex-grow:1;
214
  #ufaq-subsection-inline .ufaq-option {
215
  display:block;
216
  }
217
- }
 
 
 
 
 
 
 
 
 
 
 
 
56
  color: #29324e;
57
  background-color: rgba(199,199,199, 0.5);
58
  box-shadow: inset 2px 0 0 #1188cc;
59
+
60
  }
61
 
62
  .ufaq-options-submenu-div {
95
  padding: 3px;
96
  }
97
 
98
+
99
  @media only screen and (max-width: 650px) {
100
  .ufaq-options-page-tabbed,
101
  .ufaq-styling-page-tabbed{
215
  #ufaq-subsection-inline .ufaq-option {
216
  display:block;
217
  }
218
+ }
219
+
220
+
221
+
222
+ /************
223
+ EXTRA
224
+ ************/
225
+ #ewd-ufaq-custom-fields-table select {
226
+ width: 100% !important;
227
+ }
228
+ #ewd-ufaq-custom-fields-table th {
229
+ padding: 20px 10px 20px 10px !important;
230
+ }
css/ewd-ufaq-styles.css CHANGED
@@ -95,16 +95,90 @@ margin:0 auto;
95
  float:left;
96
  width: 90%;
97
  }
98
- .ufaq-faq-title h4 {
 
 
 
 
 
99
  display:inline-block;
100
  margin:5px !important;
101
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  /***********************
103
  Color Block Style
104
  ***********************/
105
  .ufaq-faq-display-style-Color_Block .ewd-ufaq-post-margin-symbol {
106
  background-color: #1188cc;
107
- color: #ffffff;
108
  }
109
 
110
  .ewd-ufaq-Circle {
@@ -125,8 +199,8 @@ Block Style
125
  clear: both;
126
  }
127
  .ufaq-faq-toggle:hover, .ufaq-faq-toggle a:hover{
128
- cursor: pointer;
129
- cursor: hand;
130
  text-decoration: none;
131
  }
132
  .ufaq-faq-title{
@@ -134,7 +208,14 @@ Block Style
134
  .ufaq-faq-display-style-Block a, .ufaq-faq-display-style-Block a:visited, .ufaq-faq-display-style-Block a:active{
135
  text-decoration: none;
136
  }
137
- .ufaq-faq-display-style-Block:hover, .ufaq-faq-display-style-Block:hover a, .ufaq-faq-display-style-Block:hover h4 {
 
 
 
 
 
 
 
138
  text-decoration: none !important;
139
  color:#fff !important;
140
  background: #1188cc;
@@ -150,4 +231,156 @@ List Style
150
  ***********************/
151
  .ufaq-faq-header-title a{
152
  display: inline-block;
153
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  float:left;
96
  width: 90%;
97
  }
98
+ .ufaq-faq-title h1,
99
+ .ufaq-faq-title h2,
100
+ .ufaq-faq-title h3,
101
+ .ufaq-faq-title h4,
102
+ .ufaq-faq-title h5,
103
+ .ufaq-faq-title h6 {
104
  display:inline-block;
105
  margin:5px !important;
106
  }
107
+
108
+
109
+
110
+
111
+ .ufaq-custom-field-label, .ufaq-custom-field-value {
112
+ position: relative;
113
+ float: left;
114
+ margin-top: 14px;
115
+ }
116
+ .ufaq-custom-field-label {
117
+ font-weight: bold;
118
+ }
119
+
120
+ .ufaq-faq-body .comment-respond {
121
+ margin-top: 24px;
122
+ }
123
+ .ufaq-faq-body li.comment {
124
+ list-style-type: none;
125
+ }
126
+ .ufaq-faq-body textarea {
127
+ clear: both;
128
+ display: block;
129
+ position: relative;
130
+ width: 35%;
131
+ height: 100px;
132
+ }
133
+ .ufaq-faq-body .comment-form-comment label {
134
+ clear: both;
135
+ display: block;
136
+ position: relative;
137
+ width: 100%;
138
+ }
139
+ .ufaq-faq-body .submit {
140
+ width: auto;
141
+ background: transparent;
142
+ cursor: pointer;
143
+ color: #111;
144
+ margin-bottom: 20px;
145
+ }
146
+ .ufaq-faq-body .submit:hover {
147
+ background: #111;
148
+ color: #fff;
149
+ }
150
+ .ufaq-faq-body .comment-author img {
151
+ margin-right: 8px;
152
+ }
153
+ .ufaq-faq-body .comment-body p {
154
+ margin: 10px 0;
155
+ margin-top: 10px !important;
156
+ }
157
+ .ufaq-faq-body .reply {
158
+ text-transform: uppercase;
159
+ }
160
+
161
+ .ufaq-faq-body .ufaq-back-to-top-link {
162
+ cursor: pointer;
163
+ }
164
+
165
+ .ewd-ufaq-ratings {
166
+ padding: 14px 0 0;
167
+ }
168
+ .ewd-ufaq-down-vote {
169
+ background-position: 0px 8px !important;
170
+ height: 50px !important;
171
+ }
172
+
173
+
174
+
175
+
176
  /***********************
177
  Color Block Style
178
  ***********************/
179
  .ufaq-faq-display-style-Color_Block .ewd-ufaq-post-margin-symbol {
180
  background-color: #1188cc;
181
+ color: #ffffff;
182
  }
183
 
184
  .ewd-ufaq-Circle {
199
  clear: both;
200
  }
201
  .ufaq-faq-toggle:hover, .ufaq-faq-toggle a:hover{
202
+ cursor: pointer;
203
+ cursor: hand;
204
  text-decoration: none;
205
  }
206
  .ufaq-faq-title{
208
  .ufaq-faq-display-style-Block a, .ufaq-faq-display-style-Block a:visited, .ufaq-faq-display-style-Block a:active{
209
  text-decoration: none;
210
  }
211
+ .ufaq-faq-display-style-Block:hover,
212
+ .ufaq-faq-display-style-Block:hover a,
213
+ .ufaq-faq-display-style-Block:hover h1,
214
+ .ufaq-faq-display-style-Block:hover h2,
215
+ .ufaq-faq-display-style-Block:hover h3,
216
+ .ufaq-faq-display-style-Block:hover h4,
217
+ .ufaq-faq-display-style-Block:hover h5,
218
+ .ufaq-faq-display-style-Block:hover h6 {
219
  text-decoration: none !important;
220
  color:#fff !important;
221
  background: #1188cc;
231
  ***********************/
232
  .ufaq-faq-header-title a{
233
  display: inline-block;
234
+ }
235
+
236
+
237
+
238
+ /***********************
239
+ Minimalist Style
240
+ ***********************/
241
+ .ufaq-faq-display-style-Minimalist {
242
+ border-bottom: 1px solid #aaa;
243
+ padding: 8px 0;
244
+ }
245
+ .ufaq-faq-display-style-Minimalist .ewd-ufaq-post-margin-symbol {
246
+ float: right;
247
+ height: auto;
248
+ }
249
+ .ufaq-faq-display-style-Minimalist .ewd-ufaq-post-margin-symbol span {
250
+ font-size: 22px;
251
+ }
252
+
253
+ .ufaq-faq-display-style-Minimalist .ufaq-faq-body {
254
+ padding: 20px 25px 10px;
255
+ padding-left: 40px;
256
+ }
257
+ .ufaq-faq-display-style-Minimalist .ufaq-faq-tags, .ufaq-faq-display-style-Minimalist .ufaq-social-links {
258
+ margin-top: 4px;
259
+ }
260
+ .ufaq-faq-display-style-Minimalist .ufaq-social-links ul {
261
+ float: left;
262
+ margin-bottom: 14px;
263
+ }
264
+ .ufaq-faq-display-style-Minimalist .ufaq-permalink {
265
+ margin: 24px 0;
266
+ }
267
+ .ufaq-faq-display-style-Minimalist .ufaq-permalink-image {
268
+ margin-top: -22px;
269
+ margin-left: 100px;
270
+ }
271
+
272
+ .ufaq-faq-display-style-Minimalist .ewd-ufaq-author-date {
273
+ margin-bottom: 14px;
274
+ }
275
+
276
+ .ufaq-faq-display-style-Minimalist .ufaq-faq-categories {
277
+ margin: 14px 0;
278
+ }
279
+
280
+
281
+
282
+ /***********************
283
+ Border Block Style
284
+ ***********************/
285
+ .ufaq-faq-div {
286
+ margin: 2px 0;
287
+ padding:2px 0;
288
+ clear: both;
289
+ }
290
+ .ufaq-faq-toggle:hover, .ufaq-faq-toggle a:hover{
291
+ cursor: pointer;
292
+ cursor: hand;
293
+ text-decoration: none;
294
+ }
295
+ .ufaq-faq-title{
296
+ }
297
+ .ufaq-faq-display-style-Border_Block a, .ufaq-faq-display-style-Border_Block a:visited, .ufaq-faq-display-style-Border_Block a:active{
298
+ text-decoration: none;
299
+ }
300
+ .ufaq-faq-display-style-Border_Block:hover,
301
+ .ufaq-faq-display-style-Border_Block:hover a,
302
+ .ufaq-faq-display-style-Border_Block:hover h1,
303
+ .ufaq-faq-display-style-Border_Block:hover h2,
304
+ .ufaq-faq-display-style-Border_Block:hover h3,
305
+ .ufaq-faq-display-style-Border_Block:hover h4,
306
+ .ufaq-faq-display-style-Border_Block:hover h5,
307
+ .ufaq-faq-display-style-Border_Block:hover h6 {
308
+ text-decoration: none !important;
309
+ color:#fff !important;
310
+ background: #1188cc;
311
+ }
312
+ .ufaq-faq-display-style-Border_Block.ewd-ufaq-post-active, .ufaq-faq-display-style-Border_Block.ewd-ufaq-post-active a{
313
+ color:#fff !important;
314
+ background: #1188cc;
315
+ }
316
+ .ufaq-faq-display-style-Border_Block .ufaq-faq-body {
317
+ color:#555 !important;
318
+ background: #fff;
319
+ border: 3px solid #1188cc;
320
+ border-bottom: 2px solid #1188cc;
321
+ }
322
+ .ufaq-faq-display-style-Border_Block .ufaq-faq-body a {
323
+ color:#000 !important;
324
+ background: transparent;
325
+ }
326
+
327
+ .ufaq-faq-display-style-Border_Block .ufaq-faq-tags, .ufaq-faq-display-style-Border_Block .ufaq-social-links {
328
+ margin-top: 4px;
329
+ }
330
+ .ufaq-faq-display-style-Border_Block .ufaq-social-links ul {
331
+ float: left;
332
+ margin-bottom: 14px;
333
+ }
334
+ .ufaq-faq-display-style-Border_Block .ufaq-permalink {
335
+ margin: 24px 0;
336
+ }
337
+ .ufaq-faq-display-style-Border_Block .ufaq-permalink-image {
338
+ margin-top: -22px;
339
+ margin-left: 100px;
340
+ }
341
+
342
+ .ufaq-faq-display-style-Border_Block .ewd-ufaq-author-date {
343
+ margin-bottom: 14px;
344
+ }
345
+
346
+ .ufaq-faq-display-style-Border_Block .ufaq-faq-categories {
347
+ margin: 14px 0;
348
+ }
349
+
350
+ .ufaq-faq-display-style-Border_Block.ewd-ufaq-post-active .ufaq-faq-title-text {
351
+ color: #fff !important;
352
+ }
353
+
354
+ .ufaq-faq-display-style-Border_Block .comment-reply-title {
355
+ background: transparent !important;
356
+ color: #000 !important;
357
+ }
358
+ .ufaq-faq-display-style-Border_Block:hover .comment-reply-title {
359
+ color: #000 !important;
360
+ }
361
+
362
+
363
+
364
+
365
+
366
+ /***********************
367
+ Ratings
368
+ ***********************/
369
+ .ewd-ufaq-rating-button {
370
+ height: 48px;
371
+ padding-left: 52px;
372
+ margin-right: 12px;
373
+ line-height: 48px;
374
+ float: left;
375
+ font-weight: 600;
376
+ cursor: pointer;
377
+
378
+ }
379
+ .ewd-ufaq-up-vote {
380
+ background: url("../images/Thumbs-up-icon.png");
381
+ background-repeat: no-repeat;
382
+ }
383
+ .ewd-ufaq-down-vote {
384
+ background: url("../images/Thumbs-down-icon.png");
385
+ background-repeat: no-repeat;
386
+ }
html/OptionsPage.php CHANGED
@@ -13,9 +13,11 @@
13
  $Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
14
  $Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
15
  $Show_TinyMCE = get_option("EWD_UFAQ_Show_TinyMCE");
 
16
 
17
  $Display_Style = get_option("EWD_UFAQ_Display_Style");
18
  $Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
 
19
  $WooCommerce_FAQs = get_option("EWD_UFAQ_WooCommerce_FAQs");
20
  $Use_Product = get_option("EWD_UFAQ_Use_Product");
21
  $Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
@@ -32,6 +34,9 @@
32
  $Order_By_Setting = get_option("EWD_UFAQ_Order_By");
33
  $Order_Setting = get_option("EWD_UFAQ_Order");
34
 
 
 
 
35
  $Posted_Label = get_option("EWD_UFAQ_Posted_Label");
36
  $By_Label = get_option("EWD_UFAQ_By_Label");
37
  $On_Label = get_option("EWD_UFAQ_On_Label");
@@ -85,6 +90,9 @@
85
  $UFAQ_Styling_Category_Margin = get_option("EWD_UFAQ_Styling_Category_Margin");
86
  $UFAQ_Styling_Category_Padding = get_option("EWD_UFAQ_Styling_Category_Padding");
87
 
 
 
 
88
  if (!isset($Display_Tab)) {$Display_Tab = "";}
89
  ?>
90
  <div class="wrap ufaq-options-page-tabbed">
@@ -93,6 +101,7 @@
93
  <li><a id="Basic_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == '' or $Display_Tab == 'Basic') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Basic');">Basic</a></li>
94
  <li><a id="Premium_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Premium') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Premium');">Premium</a></li>
95
  <li><a id="Order_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Order') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Order');">Ordering</a></li>
 
96
  <li><a id="Labelling_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Labelling') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Labelling');">Labelling</a></li>
97
  <li><a id="Styling_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Styling') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Styling');">Styling</a></li>
98
  </ul>
@@ -246,6 +255,16 @@
246
  </fieldset>
247
  </td>
248
  </tr>
 
 
 
 
 
 
 
 
 
 
249
  </table>
250
  </div>
251
 
@@ -259,7 +278,9 @@
259
  <label title='Default Style'><input type='radio' name='display_style' value='Default' <?php if($Display_Style == "Default") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Default</span></label><br />
260
  <label title='Color Block Style'><input type='radio' name='display_style' value='Color_Block' <?php if($Display_Style == "Color_Block") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Color Block</span></label><br />
261
  <label title='Block Style'><input type='radio' name='display_style' value='Block' <?php if($Display_Style == "Block") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Block</span></label><br />
 
262
  <label title='List Style'><input type='radio' name='display_style' value='List' <?php if($Display_Style == "List") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>List</span></label><br />
 
263
  <p>Which theme should be used to display the FAQ's?</p>
264
  </fieldset>
265
  </td>
@@ -275,6 +296,16 @@
275
  </td>
276
  </tr>
277
  <tr>
 
 
 
 
 
 
 
 
 
 
278
  <th scope="row">WooCommerce FAQs</th>
279
  <td>
280
  <fieldset><legend class="screen-reader-text"><span>WooCommerce FAQs</span></legend>
@@ -508,6 +539,65 @@
508
  </div>
509
  </div>
510
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
511
 
512
  <div id='Labelling' class='ufaq-option-set ufaq-hidden'>
513
  <h2 id='label-order-options' class='ufaq-options-page-tab-title'>Labelling Options</h2>
@@ -795,6 +885,37 @@
795
  </div>
796
  </div>
797
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
798
 
799
  </div>
800
  </div>
13
  $Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
14
  $Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
15
  $Show_TinyMCE = get_option("EWD_UFAQ_Show_TinyMCE");
16
+ $Comments_On = get_option("EWD_UFAQ_Comments_On");
17
 
18
  $Display_Style = get_option("EWD_UFAQ_Display_Style");
19
  $Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
20
+ $FAQ_Ratings = get_option("EWD_UFAQ_FAQ_Ratings");
21
  $WooCommerce_FAQs = get_option("EWD_UFAQ_WooCommerce_FAQs");
22
  $Use_Product = get_option("EWD_UFAQ_Use_Product");
23
  $Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
34
  $Order_By_Setting = get_option("EWD_UFAQ_Order_By");
35
  $Order_Setting = get_option("EWD_UFAQ_Order");
36
 
37
+ $FAQ_Fields_Array = get_option("EWD_UFAQ_FAQ_Fields");
38
+ $Hide_Blank_Fields = get_option("EWD_UFAQ_Hide_Blank_Fields");
39
+
40
  $Posted_Label = get_option("EWD_UFAQ_Posted_Label");
41
  $By_Label = get_option("EWD_UFAQ_By_Label");
42
  $On_Label = get_option("EWD_UFAQ_On_Label");
90
  $UFAQ_Styling_Category_Margin = get_option("EWD_UFAQ_Styling_Category_Margin");
91
  $UFAQ_Styling_Category_Padding = get_option("EWD_UFAQ_Styling_Category_Padding");
92
 
93
+ $UFAQ_Styling_Category_Heading_Type = get_option("EWD_UFAQ_Styling_Category_Heading_Type");
94
+ $UFAQ_Styling_FAQ_Heading_Type = get_option("EWD_UFAQ_Styling_FAQ_Heading_Type");
95
+
96
  if (!isset($Display_Tab)) {$Display_Tab = "";}
97
  ?>
98
  <div class="wrap ufaq-options-page-tabbed">
101
  <li><a id="Basic_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == '' or $Display_Tab == 'Basic') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Basic');">Basic</a></li>
102
  <li><a id="Premium_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Premium') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Premium');">Premium</a></li>
103
  <li><a id="Order_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Order') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Order');">Ordering</a></li>
104
+ <li><a id="Fields_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Fields') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Fields');">Fields</a></li>
105
  <li><a id="Labelling_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Labelling') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Labelling');">Labelling</a></li>
106
  <li><a id="Styling_Menu" class="MenuTab options-subnav-tab <?php if ($Display_Tab == 'Styling') {echo 'options-subnav-tab-active';}?>" onclick="ShowOptionTab('Styling');">Styling</a></li>
107
  </ul>
255
  </fieldset>
256
  </td>
257
  </tr>
258
+ <tr>
259
+ <th scope="row">Turn On Comment Support</th>
260
+ <td>
261
+ <fieldset><legend class="screen-reader-text"><span>Turn On Comment Support</span></legend>
262
+ <label title='Yes'><input type='radio' name='comments_on' value='Yes' <?php if($Comments_On == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
263
+ <label title='No'><input type='radio' name='comments_on' value='No' <?php if($Comments_On == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
264
+ <p>Should comment support be turned on, so that if the "Allow Comments" checkbox is selected for a given FAQ, comments are shown in the FAQ list?</p>
265
+ </fieldset>
266
+ </td>
267
+ </tr>
268
  </table>
269
  </div>
270
 
278
  <label title='Default Style'><input type='radio' name='display_style' value='Default' <?php if($Display_Style == "Default") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Default</span></label><br />
279
  <label title='Color Block Style'><input type='radio' name='display_style' value='Color_Block' <?php if($Display_Style == "Color_Block") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Color Block</span></label><br />
280
  <label title='Block Style'><input type='radio' name='display_style' value='Block' <?php if($Display_Style == "Block") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Block</span></label><br />
281
+ <label title='Border Block Style'><input type='radio' name='display_style' value='Border_Block' <?php if($Display_Style == "Border_Block") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Border Block</span></label><br />
282
  <label title='List Style'><input type='radio' name='display_style' value='List' <?php if($Display_Style == "List") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>List</span></label><br />
283
+ <label title='Minimalist Style'><input type='radio' name='display_style' value='Minimalist' <?php if($Display_Style == "Minimalist") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?>/> <span>Minimalist</span></label><br />
284
  <p>Which theme should be used to display the FAQ's?</p>
285
  </fieldset>
286
  </td>
296
  </td>
297
  </tr>
298
  <tr>
299
+ <th scope="row">FAQ Ratings</th>
300
+ <td>
301
+ <fieldset><legend class="screen-reader-text"><span>FAQ Ratings</span></legend>
302
+ <label title='Yes'><input type='radio' name='faq_ratings' value='Yes' <?php if($FAQ_Ratings == "Yes") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /> <span>Yes</span></label><br />
303
+ <label title='No'><input type='radio' name='faq_ratings' value='No' <?php if($FAQ_Ratings == "No") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /> <span>No</span></label><br />
304
+ <p>Should visitors be able to up or down vote FAQs to let others know if they found them helpful?</p>
305
+ </fieldset>
306
+ </td>
307
+ </tr>
308
+ <tr>
309
  <th scope="row">WooCommerce FAQs</th>
310
  <td>
311
  <fieldset><legend class="screen-reader-text"><span>WooCommerce FAQs</span></legend>
539
  </div>
540
  </div>
541
 
542
+ <div id='Fields' class='ufaq-option-set ufaq-hidden'>
543
+ <h2 id='label-order-options' class='ufaq-options-page-tab-title'>Fields Options (Premium)</h2>
544
+ <table class="form-table">
545
+ <tr>
546
+ <th scope="row">FAQ Custom Fields</th>
547
+ <td>
548
+ <fieldset><legend class="screen-reader-text"><span>FAQ Custom Fields</span></legend>
549
+ <table id='ewd-ufaq-custom-fields-table'>
550
+ <tr>
551
+ <th></th>
552
+ <th>Field Name</th>
553
+ <th>Field Type</th>
554
+ <th>Field Values</th>
555
+ </tr>
556
+ <?php
557
+ $Counter = 0;
558
+ $Max_ID = 0;
559
+ if (!is_array($FAQ_Fields_Array)) {$FAQ_Fields_Array = array();}
560
+ foreach ($FAQ_Fields_Array as $FAQ_Field_Item) {
561
+ echo "<tr id='ewd-ufaq-custom-field-row-" . $Counter . "'>";
562
+ echo "<td><input type='hidden' name='Custom_Field_" . $Counter . "_ID' value='" . $FAQ_Field_Item['FieldID'] . "' /><a class='ewd-ufaq-delete-custom-field' data-fieldid='" . $Counter . "'>Delete</a></td>";
563
+ echo "<td><input type='text' name='Custom_Field_" . $Counter . "_Name' value='" . $FAQ_Field_Item['FieldName'] . "'/></td>";
564
+ echo "<td><select name='Custom_Field_" . $Counter . "_Type'>"; ?>
565
+ <option value='text' <?php if ($FAQ_Field_Item['FieldType'] == "text") {echo "selected='selected'";} ?>>Text</option>
566
+ <option value='textarea' <?php if ($FAQ_Field_Item['FieldType'] == "textarea") {echo "selected='selected'";} ?>>Text Area</option>
567
+ <option value='select' <?php if ($FAQ_Field_Item['FieldType'] == "select") {echo "selected='selected'";} ?>>Select Box</option>
568
+ <option value='radio' <?php if ($FAQ_Field_Item['FieldType'] == "radio") {echo "selected='selected'";} ?>>Radio Buttons</option>
569
+ <option value='checkbox' <?php if ($FAQ_Field_Item['FieldType'] == "checkbox") {echo "selected='selected'";} ?>>Checkbox</option>
570
+ <option value='file' <?php if ($FAQ_Field_Item['FieldType'] == "file") {echo "selected='selected'";} ?>>File</option>
571
+ <option value='date' <?php if ($FAQ_Field_Item['FieldType'] == "date") {echo "selected='selected'";} ?>>Date</option>
572
+ <option value='datetime' <?php if ($FAQ_Field_Item['FieldType'] == "datetime") {echo "selected='selected'";} ?>>Date/Time</option>
573
+ <?php echo "</select></td>";
574
+ echo "<td><input type='text' name='Custom_Field_" . $Counter . "_Values' value='" . $FAQ_Field_Item['FieldValues'] . "'/></td>";
575
+ echo "</tr>";
576
+ $Counter++;
577
+ $Max_ID = max($Max_ID, $Email_Message_Item['ID']);
578
+ }
579
+ $Max_ID++;
580
+ echo "<tr><td colspan='4'><a class='ewd-ufaq-add-custom-field' data-nextid='" . $Counter . "' data-maxid='" . $Max_ID . "'>Add</a></td></tr>";
581
+ ?>
582
+ </table>
583
+ <p>Should any extra fields be added to the FAQs?<br />
584
+ The "Field Values" should be a comma-separated list of values for the select, radio or checkbox field types (no extra spaces after the comma)</p>
585
+ </fieldset>
586
+ </td>
587
+ </tr>
588
+ <tr>
589
+ <th scope="row">Hide Blank Fields</th>
590
+ <td>
591
+ <fieldset><legend class="screen-reader-text"><span>Hide Blank Fields</span></legend>
592
+ <label title='Yes'><input type='radio' name='hide_blank_fields' value='Yes' <?php if($Hide_Blank_Fields == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
593
+ <label title='No'><input type='radio' name='hide_blank_fields' value='No' <?php if($Hide_Blank_Fields == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
594
+ <p>Should field labels been hidden if a field hasn't been filled out for a particular FAQ?</p>
595
+ </fieldset>
596
+ </td>
597
+ </tr>
598
+ </table>
599
+ </div>
600
+
601
 
602
  <div id='Labelling' class='ufaq-option-set ufaq-hidden'>
603
  <h2 id='label-order-options' class='ufaq-options-page-tab-title'>Labelling Options</h2>
885
  </div>
886
  </div>
887
  </div>
888
+ <div class='ufaq-subsection'>
889
+ <div class='ufaq-subsection-header'>FAQ Heading Types</div>
890
+ <div class='ufaq-subsection-content'>
891
+ <div class='ufaq-option ufaq-styling-option'>
892
+ <div class='ufaq-option-label'>Category Heading Type</div>
893
+ <div class='ufaq-option-input'>
894
+ <select name='ufaq_styling_category_heading_type' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> >
895
+ <option value='h1' <?php if ($UFAQ_Styling_Category_Heading_Type == 'h1') {echo "selected='selected'";} ?>>H1</option>
896
+ <option value='h2' <?php if ($UFAQ_Styling_Category_Heading_Type == 'h2') {echo "selected='selected'";} ?>>H2</option>
897
+ <option value='h3' <?php if ($UFAQ_Styling_Category_Heading_Type == 'h3') {echo "selected='selected'";} ?>>H3</option>
898
+ <option value='h4' <?php if ($UFAQ_Styling_Category_Heading_Type == 'h4') {echo "selected='selected'";} ?>>H4</option>
899
+ <option value='h5' <?php if ($UFAQ_Styling_Category_Heading_Type == 'h5') {echo "selected='selected'";} ?>>H5</option>
900
+ <option value='h6' <?php if ($UFAQ_Styling_Category_Heading_Type == 'h6') {echo "selected='selected'";} ?>>H6</option>
901
+ </select>
902
+ </div>
903
+ </div>
904
+ <div class='ufaq-option ufaq-styling-option'>
905
+ <div class='ufaq-option-label'>FAQ Heading Type</div>
906
+ <div class='ufaq-option-input'>
907
+ <select name='ufaq_styling_faq_heading_type' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> >
908
+ <option value='h1' <?php if ($UFAQ_Styling_FAQ_Heading_Type == 'h1') {echo "selected='selected'";} ?>>H1</option>
909
+ <option value='h2' <?php if ($UFAQ_Styling_FAQ_Heading_Type == 'h2') {echo "selected='selected'";} ?>>H2</option>
910
+ <option value='h3' <?php if ($UFAQ_Styling_FAQ_Heading_Type == 'h3') {echo "selected='selected'";} ?>>H3</option>
911
+ <option value='h4' <?php if ($UFAQ_Styling_FAQ_Heading_Type == 'h4') {echo "selected='selected'";} ?>>H4</option>
912
+ <option value='h5' <?php if ($UFAQ_Styling_FAQ_Heading_Type == 'h5') {echo "selected='selected'";} ?>>H5</option>
913
+ <option value='h6' <?php if ($UFAQ_Styling_FAQ_Heading_Type == 'h6') {echo "selected='selected'";} ?>>H6</option>
914
+ </select>
915
+ </div>
916
+ </div>
917
+ </div>
918
+ </div>
919
 
920
  </div>
921
  </div>
images/Thumbs-down-icon.png ADDED
Binary file
images/Thumbs-up-icon.png ADDED
Binary file
js/Admin.js CHANGED
@@ -45,6 +45,56 @@ function ShowOptionTab(TabName) {
45
  jQuery("#"+TabName+"_Menu").addClass("options-subnav-tab-active");
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  jQuery(document).ready(function() {
49
  jQuery('.ewd-ufaq-spectrum').spectrum({
50
  showInput: true,
45
  jQuery("#"+TabName+"_Menu").addClass("options-subnav-tab-active");
46
  }
47
 
48
+ jQuery(document).ready(function() {
49
+ SetCustomFieldDeleteHandlers();
50
+
51
+ jQuery('.ewd-ufaq-add-custom-field').on('click', function(event) {
52
+ var Counter = jQuery(this).data('nextid');
53
+ var Max_ID = jQuery(this).data('maxid');
54
+
55
+ var HTML = "<tr id='ewd-ufaq-custom-field-row-" + Counter + "'>";
56
+ HTML += "<td><input type='hidden' name='Custom_Field_" + Counter + "_ID' value='" + Max_ID + "' /><a class='ewd-ufaq-delete-custom-field' data-fieldid='" + Counter + "'>Delete</a></td>";
57
+ HTML += "<td><input type='text' name='Custom_Field_" + Counter + "_Name'></td>";
58
+ HTML += "<td><select name='Custom_Field_" + Counter + "_Type'>";
59
+ HTML += "<option value='text'>Text</option>";
60
+ HTML += "<option value='textarea'>Text Area</option>";
61
+ HTML += "<option value='select'>Select Box</option>";
62
+ HTML += "<option value='radio'>Radio Buttons</option>";
63
+ HTML += "<option value='checkbox'>Checkbox</option>";
64
+ HTML += "<option value='file'>File</option>";
65
+ HTML += "<option value='date'>Date</option>";
66
+ HTML += "<option value='datetime'>Date/Time</option>";
67
+ HTML += "</select></td>";
68
+ HTML += "<td><input type='text' name='Custom_Field_" + Counter + "_Values'></td>";
69
+ HTML += "</tr>";
70
+
71
+ //jQuery('table > tr#ewd-uasp-add-reminder').before(HTML);
72
+ jQuery('#ewd-ufaq-custom-fields-table tr:last').before(HTML);
73
+
74
+ Counter++;
75
+ Max_ID++;
76
+ jQuery(this).data('nextid', Counter); //updates but doesn't show in DOM
77
+ jQuery(this).data('maxid', Max_ID);
78
+
79
+ SetCategoryDeleteHandlers();
80
+
81
+ event.preventDefault();
82
+ });
83
+ });
84
+
85
+ function SetCustomFieldDeleteHandlers() {
86
+ jQuery('.ewd-ufaq-delete-custom-field').on('click', function(event) {
87
+ var ID = jQuery(this).data('fieldid');
88
+ var tr = jQuery('#ewd-ufaq-custom-field-row-'+ID);
89
+
90
+ tr.fadeOut(400, function(){
91
+ tr.remove();
92
+ });
93
+
94
+ event.preventDefault();
95
+ });
96
+ }
97
+
98
  jQuery(document).ready(function() {
99
  jQuery('.ewd-ufaq-spectrum').spectrum({
100
  showInput: true,
js/ewd-ufaq-js.js CHANGED
@@ -1,6 +1,7 @@
1
  jQuery(function(){ //DOM Ready
2
  ufaqSetClickHandlers();
3
  UFAQSetAutoCompleteClickHandlers();
 
4
  });
5
 
6
  function runEffect(display, post_id) {
@@ -174,6 +175,24 @@ function Ufaq_Ajax_Reload() {
174
  });
175
  }
176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  /*jQuery(document).ready(function() {
178
  jQuery('a[href*=#]:not([href=#])').click(function() {
179
  var post_id = jQuery(this).attr("data-postid");
1
  jQuery(function(){ //DOM Ready
2
  ufaqSetClickHandlers();
3
  UFAQSetAutoCompleteClickHandlers();
4
+ UFAQSetRatingHandlers();
5
  });
6
 
7
  function runEffect(display, post_id) {
175
  });
176
  }
177
 
178
+ function UFAQSetRatingHandlers() {
179
+ jQuery('.ewd-ufaq-rating-button').on('click', function() {
180
+ var FAQ_ID = jQuery(this).data('ratingfaqid');
181
+ jQuery('*[data-ratingfaqid="' + FAQ_ID + '"]').off('click');
182
+
183
+ var Current_Count = jQuery(this).html();
184
+ Current_Count++;
185
+ jQuery(this).html(Current_Count);
186
+
187
+ if (jQuery(this).hasClass("ewd-ufaq-up-vote")) {Vote_Type = "Up";}
188
+ else {Vote_Type = "Down";}
189
+
190
+ var data = '&FAQ_ID=' + FAQ_ID + '&Vote_Type=' + Vote_Type + '&action=ufaq_update_rating';
191
+ jQuery.post(ajaxurl, data, function(response) {
192
+ });
193
+ });
194
+ }
195
+
196
  /*jQuery(document).ready(function() {
197
  jQuery('a[href*=#]:not([href=#])').click(function() {
198
  var post_id = jQuery(this).attr("data-postid");
readme.txt CHANGED
@@ -1,6 +1,6 @@
1
  === FAQ ===
2
  Contributors: Rustaurius, EtoileWebDesign
3
- Tags: frequently asked questions, FAQ, FAQs, easy FAQ, knowledge base, simple FAQ, FAQ categories, FAQs, knowledgebase, answer, FAQ answer, answers, faq page, FAQ Plugin, help, help desk, helpdesk, questions, FAQ questions, wordpress faq, FAQ list, FAQ accordion, custom post type with accordion, FAQ custom post type, faq list, faq with accordion, jquery ui accordion, jquery faq, jquery-ui, shortcodes, wordpress, WordPress Plugin, wordpress faq plugin, Categories, social media, facebook, widget, faq widget, widgets, statistics, AJAX, AJAX FAQ, analytics, responsive, responsive faq, submit questions, WooCommerce, WooCommerce FAQ, WooCommerce Tab, WooCommerce product page
4
  Requires at least: 3.9.0
5
  Tested up to: 4.5
6
  License: GPLv3
@@ -14,7 +14,7 @@ A simple FAQ plugin that lets you create, order and publicize FAQs, insert 3 sty
14
 
15
  [youtube https://www.youtube.com/watch?v=xeGVZnVrZ6I]
16
 
17
- Create, organize and publicize your FAQ in no time through your Wordpress Admin Panel with the incredibly easy-to-use, responsive Ultimate FAQ plugin. You can use either the accordion FAQ style, to display one FAQ answer on click, or the list FAQ style, to have FAQ answers displayed by default. FAQ features include FAQ statistics that show how many times FAQs have been viewed, FAQ styling options, FAQ categories and FAQ tags, display and FAQ ordering options, among many others. Includes an FAQ shortcode helper, that lets you create shortcodes with attributes without having to enter them manually.
18
 
19
  Want to decide exactly what order your FAQs are displayed in? Use our simple FAQ drag-and-drop reordering feature! Create SEO-friendly links to individual FAQ posts to simply direct customers to exactly the right FAQ answer, right away. You can even let your customers add to your custom FAQ list with the [submit-question] smart FAQ shortcode, which lets visitors submit an FAQ question and even propose an FAQ answer for it! Easily add links to popular social media, such as Facebook, Twitter and Pinterest so that your customers can help you spread the word about your FAQ!
20
 
@@ -146,6 +146,15 @@ Video 3 - FAQs Ordering
146
  9. All answers displayed in the 'list' FAQ mode
147
 
148
  == Changelog ==
 
 
 
 
 
 
 
 
 
149
  = 1.3.5 =
150
  - Fixed a font-family error
151
 
1
  === FAQ ===
2
  Contributors: Rustaurius, EtoileWebDesign
3
+ Tags: frequently asked questions, FAQ, FAQs, easy FAQ, knowledge base, simple FAQ, FAQ categories, FAQs, knowledgebase, answer, FAQ answer, answers, faq page, FAQ Plugin, help, help desk, helpdesk, questions, FAQ questions, wordpress faq, FAQ list, FAQ accordion, custom post type with accordion, FAQ custom post type, faq list, faq with accordion, jquery ui accordion, jquery faq, jquery-ui, shortcodes, WordPress Plugin, wordpress faq plugin, social media, widget, faq widget, statistics, AJAX, AJAX FAQ, responsive faq, submit questions, WooCommerce, WooCommerce FAQ, WooCommerce Tab, WooCommerce product page, job postings
4
  Requires at least: 3.9.0
5
  Tested up to: 4.5
6
  License: GPLv3
14
 
15
  [youtube https://www.youtube.com/watch?v=xeGVZnVrZ6I]
16
 
17
+ Create, organize and publicize your FAQ in no time through your Wordpress Admin Panel with the incredibly easy-to-use, responsive Ultimate FAQ plugin. You can use either the accordion FAQ style, to display one FAQ answer on click, or the list FAQ style, to have FAQ answers displayed by default. FAQ features include FAQ statistics that show how many times FAQs have been viewed, FAQ styling options, FAQ categories and FAQ tags, display and FAQ ordering options, among many others. Includes an FAQ shortcode helper, that lets you create shortcodes with attributes without having to enter them manually. FAQ also works greats for any content that needs to be hidden until it is clicked, like job postings, recipes, etc.!
18
 
19
  Want to decide exactly what order your FAQs are displayed in? Use our simple FAQ drag-and-drop reordering feature! Create SEO-friendly links to individual FAQ posts to simply direct customers to exactly the right FAQ answer, right away. You can even let your customers add to your custom FAQ list with the [submit-question] smart FAQ shortcode, which lets visitors submit an FAQ question and even propose an FAQ answer for it! Easily add links to popular social media, such as Facebook, Twitter and Pinterest so that your customers can help you spread the word about your FAQ!
20
 
146
  9. All answers displayed in the 'list' FAQ mode
147
 
148
  == Changelog ==
149
+ = 1.4.0 =
150
+ - Added two new FAQ display styles, minimalist and border block
151
+ - Added in support for comments directly in the FAQs if enabled
152
+ - Added two new premium features, FAQ ratings and FAQ custom fields
153
+ - Added a premium styling option to let users select which heading the FAQ and comment titls have (h1, h2, etc.)
154
+
155
+ = 1.3.6 =
156
+ - Minor CSS update
157
+
158
  = 1.3.5 =
159
  - Fixed a font-family error
160