Ultimate FAQ - Version 1.1.5

Version Description

  • Fixed a problem with FAQ permalinks not opening in the list
Download this release

Release Info

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

Code changes from version 1.1.4 to 1.1.5

Files changed (4) hide show
  1. Main.php +1 -1
  2. Shortcodes/DisplayFAQs.php +12 -2
  3. js/ewd-ufaq-js.js +1 -1
  4. readme.txt +4 -1
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.1.4
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.1.5
11
  */
12
 
13
  global $ewd_ufaq_message;
Shortcodes/DisplayFAQs.php CHANGED
@@ -116,9 +116,14 @@ function Display_FAQs($atts) {
116
 
117
  if (get_query_var('single_faq') != "") {
118
  $FAQ = get_page_by_path(get_query_var('single_faq'),OBJECT,'ufaq');
119
- $ReturnString .= "<script>var Display_FAQ_ID = " . $FAQ->ID . ";</script>";
 
120
  }
121
- if (isset($_GET['Display_FAQ'])) {$ReturnString .= "<script>var Display_FAQ_ID = " . $_GET['Display_FAQ'] . ";</script>";}
 
 
 
 
122
 
123
  if ($Custom_CSS != "") {$ReturnString .= "<style>" . $Custom_CSS . "</style>";}
124
  $ReturnString .= EWD_UFAQ_Add_Modified_Styles();
@@ -179,6 +184,11 @@ function Display_FAQs($atts) {
179
  if ($Pretty_Permalinks == "Yes") {$FAQ_Permalink = get_the_permalink() . "single-faq/" . $faq->post_name;}
180
  else {$FAQ_Permalink = get_the_permalink() . "?Display_FAQ=" . $faq->ID;}
181
 
 
 
 
 
 
182
  $TitlesArray[] = json_encode($faq->post_title);
183
  $HeaderString .= "<div class='ufaq-faq-header-title'><a href='' class='ufaq-faq-header-link' data-postid='" . $faq->ID . "-" . $Counter . "'>" . $faq->post_title . "</a></div>";
184
 
116
 
117
  if (get_query_var('single_faq') != "") {
118
  $FAQ = get_page_by_path(get_query_var('single_faq'),OBJECT,'ufaq');
119
+ $ReturnString .= "<script>var Display_FAQ_ID = '" . $FAQ->ID . "-%Counter_Placeholder%';</script>";
120
+ $Display_FAQ_ID = $FAQ->ID;
121
  }
122
+ elseif (isset($_GET['Display_FAQ'])) {
123
+ $ReturnString .= "<script>var Display_FAQ_ID = '" . $_GET['Display_FAQ'] . "-%Counter_Placeholder%';</script>";
124
+ $Display_FAQ_ID = $_GET['Display_FAQ'];
125
+ }
126
+ else {$Display_FAQ_ID = "";}
127
 
128
  if ($Custom_CSS != "") {$ReturnString .= "<style>" . $Custom_CSS . "</style>";}
129
  $ReturnString .= EWD_UFAQ_Add_Modified_Styles();
184
  if ($Pretty_Permalinks == "Yes") {$FAQ_Permalink = get_the_permalink() . "single-faq/" . $faq->post_name;}
185
  else {$FAQ_Permalink = get_the_permalink() . "?Display_FAQ=" . $faq->ID;}
186
 
187
+ if ($Display_FAQ_ID == $faq->ID) {
188
+ $ReturnString = str_replace("%Counter_Placeholder%", $Counter, $ReturnString);
189
+ $Display_FAQ_ID = "";
190
+ }
191
+
192
  $TitlesArray[] = json_encode($faq->post_title);
193
  $HeaderString .= "<div class='ufaq-faq-header-title'><a href='' class='ufaq-faq-header-link' data-postid='" . $faq->ID . "-" . $Counter . "'>" . $faq->post_title . "</a></div>";
194
 
js/ewd-ufaq-js.js CHANGED
@@ -133,7 +133,7 @@ jQuery(document).ready(function() {
133
  if (typeof(Display_FAQ_ID) != "undefined" && Display_FAQ_ID !== null) {
134
  var selectedIDString = 'ufaq-body-'+Display_FAQ_ID;
135
  EWD_UFAQ_Reveal_FAQ(Display_FAQ_ID, selectedIDString);
136
- jQuery('html, body').animate({scrollTop: jQuery("."+selectedIDString).offset().top -80}, 100);
137
  }
138
  });
139
 
133
  if (typeof(Display_FAQ_ID) != "undefined" && Display_FAQ_ID !== null) {
134
  var selectedIDString = 'ufaq-body-'+Display_FAQ_ID;
135
  EWD_UFAQ_Reveal_FAQ(Display_FAQ_ID, selectedIDString);
136
+ jQuery('html, body').delay(800).animate({scrollTop: jQuery("#"+selectedIDString).offset().top - 180}, 300);
137
  }
138
  });
139
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: Rustaurius, EtoileWebDesign
3
  Tags: frequently asked questions, FAQ, FAQs, easy FAQ, knowledge base, simple FAQ, FAQ categories, FAQs, knowledgebase, answer, answers, faq page, FAQ Plugin, help, help desk, helpdesk, questions, wordpress faq, FAQ list, FAQ accordion, custom post type with accordion, faq list, faq with accordion, jquery ui accordion, jquery-ui, shortcodes, wordpress, WordPress Plugin, Categories, social media, facebook, widget, widgets, statistics, AJAX, analytics, responsive
4
  Requires at least: 3.7.0
5
- Tested up to: 4.3.1
6
  License: GPLv3
7
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
8
 
@@ -126,6 +126,9 @@ For more questions and support you can post in the support forum:
126
  9. All answers displayed in the 'list' FAQ mode
127
 
128
  == Changelog ==
 
 
 
129
  = 1.1.4 =
130
  - Fixed a conflict with WooCommerce, where a UFAQ script was keeping product information tabs open
131
 
2
  Contributors: Rustaurius, EtoileWebDesign
3
  Tags: frequently asked questions, FAQ, FAQs, easy FAQ, knowledge base, simple FAQ, FAQ categories, FAQs, knowledgebase, answer, answers, faq page, FAQ Plugin, help, help desk, helpdesk, questions, wordpress faq, FAQ list, FAQ accordion, custom post type with accordion, faq list, faq with accordion, jquery ui accordion, jquery-ui, shortcodes, wordpress, WordPress Plugin, Categories, social media, facebook, widget, widgets, statistics, AJAX, analytics, responsive
4
  Requires at least: 3.7.0
5
+ Tested up to: 4.4.0
6
  License: GPLv3
7
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
8
 
126
  9. All answers displayed in the 'list' FAQ mode
127
 
128
  == Changelog ==
129
+ = 1.1.5 =
130
+ - Fixed a problem with FAQ permalinks not opening in the list
131
+
132
  = 1.1.4 =
133
  - Fixed a conflict with WooCommerce, where a UFAQ script was keeping product information tabs open
134