Add apply_filters() to popular posts widget
smolNovember 6, 2014 at 8:17 am #23336
It would be nice to have some filter(s) to customise the arguments of popular posts widget’s query.
I’m sorry I didn’t create a patch but here’s my little peace of code I’ve added to popular-posts.php:PHP12//add filter to alter the arguments if needed<br />$args = apply_filters('st_popular_posts_args', $args);
arround line 101, just beforePHP1$new_query = new WP_Query($args);
I didn’t check the other widgets but maybe this could be a more general request.
Thank for your time and theme.
Have a nice day