Ultimate FAQ - Version 1.2.2

Version Description

  • Added the ability to have multiple widgets or shortcodes on a page
  • Fixed a small error with the popular FAQs shortcode
Download this release

Release Info

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

Code changes from version 1.2.1 to 1.2.2

Functions/EWD_UFAQ_Version_Update.php CHANGED
@@ -43,7 +43,7 @@ function EWD_UFAQ_Version_Update_Box() {
43
  <h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
44
  <div class="inside">
45
  <?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='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>
46
- <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.2.1!", "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 } ?>
47
 
48
  <?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>
49
  <?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 } */ ?>
43
  <h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
44
  <div class="inside">
45
  <?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='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>
46
+ <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.2.2!", "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 } ?>
47
 
48
  <?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>
49
  <?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 } */ ?>
Main.php CHANGED
@@ -7,7 +7,7 @@ Author: Etoile Web Design
7
  Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: EWD_UFAQ
10
- Version: 1.2.1
11
  */
12
 
13
  global $ewd_ufaq_message;
7
  Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: EWD_UFAQ
10
+ Version: 1.2.2
11
  */
12
 
13
  global $ewd_ufaq_message;
Shortcodes/DisplayFAQs.php CHANGED
@@ -46,6 +46,8 @@ function Display_FAQs($atts) {
46
  if ($Display_Style != "Color_Block") {$Color_Block_Shape = "";}
47
  else {$Color_Block_Shape = "ewd-ufaq-" . $Color_Block_Shape;}
48
 
 
 
49
  $ReturnString = "";
50
  $HeaderString = "";
51
  $TitlesArray = array();
@@ -211,14 +213,14 @@ function Display_FAQs($atts) {
211
  }
212
 
213
  $TitlesArray[] = json_encode($faq->post_title);
214
- $HeaderString .= "<div class='ufaq-faq-header-title'><a href='' class='ufaq-faq-header-link' data-postid='" . $faq->ID . "-" . $Counter . "'>" . $faq->post_title . "</a></div>";
215
 
216
- $ReturnString .= "<div class='ufaq-faq-div ufaq-faq-display-style-" . $Display_Style . " id='ufaq-post-" . $faq->ID . "-" . $Counter . "' data-postid='" . $faq->ID . "-" . $Counter . "'>";
217
 
218
  $ReturnString .= "<div class='ufaq-faq-title";
219
  if ($FAQ_Toggle != "No") {$ReturnString .= " ufaq-faq-toggle";}
220
- $ReturnString .= "' id='ufaq-title-" . $faq->ID . "' data-postid='" . $faq->ID . "-" . $Counter . "'>";
221
- $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;
222
  if ($Display_All_Answers == "Yes") {$ReturnString .= "'> - </span></div>";}
223
  else {$ReturnString .= "'> + </span></div>";}
224
  $ReturnString .= "<div class='ufaq-faq-title-text'><h4>" .$faq->post_title . "</h4></div><div class='ewd-ufaq-clear'></div></a>";
@@ -227,7 +229,7 @@ function Display_FAQs($atts) {
227
  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>";}
228
  $ReturnString .= "<div class='ufaq-faq-body ufaq-body-" . $faq->ID;
229
  if ($Display_All_Answers != "Yes") {$ReturnString .= " ewd-ufaq-hidden";}
230
- $ReturnString .= "' id='ufaq-body-" . $faq->ID . "-" . $Counter . "'>";
231
 
232
  if ($Display_Author == "Yes" or $Display_Date == "Yes") {
233
  $Display_Author_Value = get_post_meta($faq->ID, "EWD_UFAQ_Post_Author", true);
@@ -366,4 +368,13 @@ function EWD_UFAQ_Included_Category_Check($Category, $include_category_array) {
366
  $Parent_Category = get_term($Category->parent, 'ufaq-category');
367
  return EWD_UFAQ_Included_Category_Check($Parent_Category, $include_category_array);
368
  }
 
 
 
 
 
 
 
 
 
369
  }
46
  if ($Display_Style != "Color_Block") {$Color_Block_Shape = "";}
47
  else {$Color_Block_Shape = "ewd-ufaq-" . $Color_Block_Shape;}
48
 
49
+ $Unique_ID = EWD_UFAQ_Rand_Chars(3);
50
+
51
  $ReturnString = "";
52
  $HeaderString = "";
53
  $TitlesArray = array();
213
  }
214
 
215
  $TitlesArray[] = json_encode($faq->post_title);
216
+ $HeaderString .= "<div class='ufaq-faq-header-title'><a href='' class='ufaq-faq-header-link' data-postid='" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "'>" . $faq->post_title . "</a></div>";
217
 
218
+ $ReturnString .= "<div class='ufaq-faq-div ufaq-faq-display-style-" . $Display_Style . " id='ufaq-post-" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "' data-postid='" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "'>";
219
 
220
  $ReturnString .= "<div class='ufaq-faq-title";
221
  if ($FAQ_Toggle != "No") {$ReturnString .= " ufaq-faq-toggle";}
222
+ $ReturnString .= "' id='ufaq-title-" . $faq->ID . "' data-postid='" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "'>";
223
+ $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;
224
  if ($Display_All_Answers == "Yes") {$ReturnString .= "'> - </span></div>";}
225
  else {$ReturnString .= "'> + </span></div>";}
226
  $ReturnString .= "<div class='ufaq-faq-title-text'><h4>" .$faq->post_title . "</h4></div><div class='ewd-ufaq-clear'></div></a>";
229
  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>";}
230
  $ReturnString .= "<div class='ufaq-faq-body ufaq-body-" . $faq->ID;
231
  if ($Display_All_Answers != "Yes") {$ReturnString .= " ewd-ufaq-hidden";}
232
+ $ReturnString .= "' id='ufaq-body-" . $Unique_ID . "-" . $faq->ID . "-" . $Counter . "'>";
233
 
234
  if ($Display_Author == "Yes" or $Display_Date == "Yes") {
235
  $Display_Author_Value = get_post_meta($faq->ID, "EWD_UFAQ_Post_Author", true);
368
  $Parent_Category = get_term($Category->parent, 'ufaq-category');
369
  return EWD_UFAQ_Included_Category_Check($Parent_Category, $include_category_array);
370
  }
371
+ }
372
+
373
+ function EWD_UFAQ_Rand_Chars($CharLength = 10) {
374
+ $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
375
+ $randstring = '';
376
+ for ($i = 0; $i < $CharLength; $i++) {
377
+ $randstring .= $characters[rand(0, strlen($characters))];
378
+ }
379
+ return $randstring;
380
  }
Shortcodes/Display_Popular_FAQs.php CHANGED
@@ -7,7 +7,6 @@ function Display_Popular_FAQs($atts) {
7
  $atts
8
  )
9
  );
10
- echo "called";
11
  $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." orderby='popular']");
12
 
13
  return $ReturnString;
7
  $atts
8
  )
9
  );
 
10
  $ReturnString = do_shortcode("[ultimate-faqs post_count=".$post_count." orderby='popular']");
11
 
12
  return $ReturnString;
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tested up to: 4.4.2
6
  License: GPLv3
7
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
8
 
9
- A simple FAQ plugin that lets you or your users create FAQs, order FAQs, publicize FAQs, etc. and insert a list or AJAX FAQ search using shortcodes
10
 
11
  == Description ==
12
 
@@ -142,6 +142,10 @@ Video 3 - FAQs Ordering
142
  9. All answers displayed in the 'list' FAQ mode
143
 
144
  == Changelog ==
 
 
 
 
145
  = 1.2.1 =
146
  - Fixed a missing file error
147
 
6
  License: GPLv3
7
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
8
 
9
+ A simple FAQ plugin that lets you create, order and publicize FAQs, insert 3 styles of FAQs on a page or WooCommerce product, and use AJAX FAQ search using shortcodes
10
 
11
  == Description ==
12
 
142
  9. All answers displayed in the 'list' FAQ mode
143
 
144
  == Changelog ==
145
+ = 1.2.2 =
146
+ - Added the ability to have multiple widgets or shortcodes on a page
147
+ - Fixed a small error with the popular FAQs shortcode
148
+
149
  = 1.2.1 =
150
  - Fixed a missing file error
151