🔥 HOT: GZXFcmtw - Uncensored 2025

etoileweb

UFAQ - display_all_answers and group_by_category filtering

Apr 13th, 2021
1,781
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.82 KB | None | 0 0
  1. <?php
  2. // Example functions that use the new ability to filter the
  3. // display_all_answers and group_by_category settings for
  4. // the View.FAQs class in the Ultimate FAQs plugin.
  5. // Can be inserted in your theme's functions.php file.
  6.  
  7. // The following disables the display_all_answers setting,
  8. // so you can, for example, have a single FAQ start as closed.
  9. function disable_display_all( $display_all ) {
  10.  
  11.     return false;
  12. }
  13. add_filter( 'ewd_ufaq_display_all_answers', 'disable_display_all' );
  14.  
  15. // The following enables the group_by_category setting,
  16. // so you can, for example, have the category heading show
  17. // even if you have just a single FAQ being output.
  18. function enable_group_by_category( $group_by_category ) {
  19.    
  20.     return true;
  21. }
  22. add_filter( 'ewd_ufaq_group_by_category', 'enable_group_by_category' );
  23.  
Advertisement
Add Comment
Please, Sign In to add comment