I just made this exact change to the plugin. It only required updating a few lines of code in the /includes/feed-display.php file
Change Line 173 to:
$feed_items = wprss_get_feed_items_query( $settings, $args );
Starting at Line 69, change the wprss_get_feed_items_query function to:
function wprss_get_feed_items_query( $settings, $args = false ) {
// Arguments for the next query to fetch all feed items
$posts_per_page = (isset($args['feed_limit']) && $args['feed_limit'] > 0) ? $args['feed_limit'] : $settings['feed_limit'];
$feed_items_args = apply_filters(
'wprss_display_feed_items_query',
array(
'post_type' => 'wprss_feed_item',
'posts_per_page' => $posts_per_page,
'orderby' => 'meta_value',
'meta_key' => 'wprss_item_date',
'order' => 'DESC'
)
);
// Query to get all feed items for display
$feed_items = new WP_Query( $feed_items_args );
return $feed_items;
}
Works for me. Now I can set the limit in the shortcode like this: [wp_rss_aggregator feed_limit=5]. And it will default back to the widget setting if a limit isn’t specified.