Notifications
Clear all

[Closed] Request to add filter hooks.

2 Posts
2 Users
0 Likes
831 Views
Posts: 19
Topic starter
(@zmgma)
Eminent Member
Joined: 4 years ago

Hello!

First of all, thank you for your great works! I appreciate it.

I would like to suggest adding filter hooks, and the attached zip file is the patch file for filters.

I tested on my side several times and it seems works well.

To sum up,

1) order_by.patch : The filter

define('ORDER_BY', apply_filters( 'order_by', 'modified' )); 

determines how posts are sorted by 'modified' or 'created'. I changed all parts of 'modified' with ORDER_BY, so it is easy to change the way of sorting.

2) time_format.patch : The filters

apply_filters( 'enable_custom_date', false, $diff )
apply_filters( 'wpforo_custom_date_format', sprintf( wpforo_phrase('%s ago', false, false), $d ), $dt);

can change the way of time format in forums.

3) fontawesome_filter.patch: filters with fontawesome icons in topics

4) search_icon.patch: This is not related with filter hook. In this patch, it adds search icon beside page navigation, so it is useful without wpforo menu bar. A lot of forums have search icon beside page-navi, not in top bar or side widget.

5) trivia_style.patch: move inline style to style.css for caching and customizing, and move wpforo_template_pagenavi('wpf-navi-topic-bottom'); for better UI.

Thank you for your supports. I hope you reflect those filters and patch. Thank you again. Have a nice day! 😀

Best regards,

Dan

1 Reply
Sofy
Posts: 4309
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

Hi @zmgma,

Thank you for the suggestion. 

We'll take this into consideration for future updates.Â