Skip to content

Commit

Permalink
Adds filter hook to customize query args per widget instance
Browse files Browse the repository at this point in the history
  • Loading branch information
cabrerahector committed Dec 8, 2018
1 parent 6220de3 commit 634df08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/class-recently-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ protected function query_posts( $instance ) {
$instance
);

$args = apply_filters( 'recently_query_args', $instance['args'] );
$args = apply_filters( 'recently_pre_get_posts', $instance['widget_id'], $instance['args'] );
$args = apply_filters( 'recently_query_args', $args );

return new WP_Query( $args );

Expand Down

0 comments on commit 634df08

Please sign in to comment.