Add a hook to alter $query args.

This commit is contained in:
savvasha
2023-04-07 17:10:30 +03:00
parent 64036ba0ae
commit 719712d3d7

View File

@@ -1156,6 +1156,8 @@ if ( ! function_exists( 'sp_post_checklist' ) ) {
$query['orderby'] = 'meta_value_num'; $query['orderby'] = 'meta_value_num';
$query['order'] = 'ASC'; $query['order'] = 'ASC';
endif; endif;
// Add a hook to alter $query args.
$query = apply_filters( 'sportspress_sp_post_checklist_args', $query, $meta );
$posts = get_posts( $query ); $posts = get_posts( $query );
endif; endif;
foreach ( $posts as $post ) : foreach ( $posts as $post ) :