Version Description
(2021-04-13) = - Fixed an issue where, when a single FAQ is linked to, the plugin was no longer scrolling to it. - Fixed incorrect path for loading plugin text domain. - Added the ability for the display_all_answers and group_by_category settings, for the View.FAQs class, to be filtered. This will allow you to override the default settings, to (among other things) do something like make an FAQ start closed even if it's the only one displaying. You can see the following for an example: https://pastebin.com/gZXFcmtw
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 2.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.0.4 to 2.0.5
- assets/js/ewd-ufaq.js +3 -1
- readme.txt +5 -0
- ultimate-faqs.php +2 -2
- views/View.FAQs.class.php +19 -3
assets/js/ewd-ufaq.js
CHANGED
@@ -191,9 +191,11 @@ jQuery(document).ready(function() {
|
|
191 |
|
192 |
var faq = jQuery( '.ewd-ufaq-faq-div[data-post_id="' + ewd_ufaq_php_data.display_faq + '"]' );
|
193 |
|
|
|
|
|
194 |
EWD_UFAQ_Reveal_FAQ( faq );
|
195 |
|
196 |
-
|
197 |
}
|
198 |
});
|
199 |
|
191 |
|
192 |
var faq = jQuery( '.ewd-ufaq-faq-div[data-post_id="' + ewd_ufaq_php_data.display_faq + '"]' );
|
193 |
|
194 |
+
faq.parent().removeClass( 'ewd-ufaq-hidden' );
|
195 |
+
|
196 |
EWD_UFAQ_Reveal_FAQ( faq );
|
197 |
|
198 |
+
jQuery('html, body').animate({scrollTop: faq.offset().top -80}, 100);
|
199 |
}
|
200 |
});
|
201 |
|
readme.txt
CHANGED
@@ -264,6 +264,11 @@ Video 3 - FAQs Ordering
|
|
264 |
|
265 |
== Changelog ==
|
266 |
|
|
|
|
|
|
|
|
|
|
|
267 |
= 2.0.4 (2021-04-12) =
|
268 |
- Update to the structured data to make it so that, if you have multiple instances of the shortcode on the same page, it will combine the data from all of them and output only one FAQPage schema.
|
269 |
- Fixes an issue with filtered FAQ content being displayed on archive pages.
|
264 |
|
265 |
== Changelog ==
|
266 |
|
267 |
+
= 2.0.5 (2021-04-13) =
|
268 |
+
- Fixed an issue where, when a single FAQ is linked to, the plugin was no longer scrolling to it.
|
269 |
+
- Fixed incorrect path for loading plugin text domain.
|
270 |
+
- Added the ability for the display_all_answers and group_by_category settings, for the View.FAQs class, to be filtered. This will allow you to override the default settings, to (among other things) do something like make an FAQ start closed even if it's the only one displaying. You can see the following for an example: https://pastebin.com/gZXFcmtw
|
271 |
+
|
272 |
= 2.0.4 (2021-04-12) =
|
273 |
- Update to the structured data to make it so that, if you have multiple instances of the shortcode on the same page, it will combine the data from all of them and output only one FAQPage schema.
|
274 |
- Fixes an issue with filtered FAQ content being displayed on archive pages.
|
ultimate-faqs.php
CHANGED
@@ -7,7 +7,7 @@ Author: Etoile Web Design
|
|
7 |
Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
|
8 |
Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
9 |
Text Domain: ultimate-faqs
|
10 |
-
Version: 2.0.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) )
|
@@ -229,7 +229,7 @@ class ewdufaqInit {
|
|
229 |
*/
|
230 |
public function load_textdomain() {
|
231 |
|
232 |
-
load_plugin_textdomain( 'ultimate-faqs', false,
|
233 |
}
|
234 |
|
235 |
/**
|
7 |
Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
|
8 |
Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
9 |
Text Domain: ultimate-faqs
|
10 |
+
Version: 2.0.5
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) )
|
229 |
*/
|
230 |
public function load_textdomain() {
|
231 |
|
232 |
+
load_plugin_textdomain( 'ultimate-faqs', false, plugin_basename( dirname( __FILE__ ) ) . '/languages/' );
|
233 |
}
|
234 |
|
235 |
/**
|
views/View.FAQs.class.php
CHANGED
@@ -40,9 +40,6 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
40 |
|
41 |
if ( get_class( $faq ) != 'ewdufaqFAQ' ) { continue; }
|
42 |
|
43 |
-
$faq->no_comments = $this->no_comments;
|
44 |
-
$faq->display_all_answers = $this->display_all_answers;
|
45 |
-
|
46 |
$faq_view = new ewdufaqViewFAQ( $faq );
|
47 |
|
48 |
$this->faqs[] = $faq_view;
|
@@ -60,6 +57,8 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
60 |
|
61 |
$this->create_faq_data();
|
62 |
|
|
|
|
|
63 |
$this->add_schema_data();
|
64 |
|
65 |
// Add any dependent stylesheets or javascript
|
@@ -364,6 +363,19 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
364 |
return $titles;
|
365 |
}
|
366 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
/**
|
368 |
* Create pagination data and put FAQs into their categories, if necessary
|
369 |
* @since 2.0.0
|
@@ -465,6 +477,10 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
465 |
}
|
466 |
|
467 |
$this->include_categories = array_filter( $this->include_categories );
|
|
|
|
|
|
|
|
|
468 |
}
|
469 |
|
470 |
/**
|
40 |
|
41 |
if ( get_class( $faq ) != 'ewdufaqFAQ' ) { continue; }
|
42 |
|
|
|
|
|
|
|
43 |
$faq_view = new ewdufaqViewFAQ( $faq );
|
44 |
|
45 |
$this->faqs[] = $faq_view;
|
57 |
|
58 |
$this->create_faq_data();
|
59 |
|
60 |
+
$this->set_faq_properties();
|
61 |
+
|
62 |
$this->add_schema_data();
|
63 |
|
64 |
// Add any dependent stylesheets or javascript
|
363 |
return $titles;
|
364 |
}
|
365 |
|
366 |
+
/**
|
367 |
+
* Sets properties that need to be individually set
|
368 |
+
* @since 2.0.0
|
369 |
+
*/
|
370 |
+
public function set_faq_properties() {
|
371 |
+
|
372 |
+
foreach ( $this->faqs as $faq ) {
|
373 |
+
|
374 |
+
$faq->display_all_answers = $this->display_all_answers;
|
375 |
+
$faq->no_comments = $this->no_comments;
|
376 |
+
}
|
377 |
+
}
|
378 |
+
|
379 |
/**
|
380 |
* Create pagination data and put FAQs into their categories, if necessary
|
381 |
* @since 2.0.0
|
477 |
}
|
478 |
|
479 |
$this->include_categories = array_filter( $this->include_categories );
|
480 |
+
|
481 |
+
//allow settings to be filtered if necessary
|
482 |
+
$this->display_all_answers = apply_filters( 'ewd_ufaq_display_all_answers', $this->display_all_answers, $this );
|
483 |
+
$this->group_by_category = apply_filters( 'ewd_ufaq_group_by_category', $this->group_by_category, $this );
|
484 |
}
|
485 |
|
486 |
/**
|