Welcome!
So I'm focusing on the apply_filters method instead of changing core plugin code, this is what I did for the dating site's plugin.
// I use apply_filters() to allow a general override of values... public static function loop_shop_per_page() { $value = get_option( 'posts_per_page' ); return apply_filters('filter_loop_shop_per_page', $value); } Then, in WP functions.php (in the child theme), I'm able to select the value on for that by adding the necessary filter:
add_filter('filter_loop_shop_per_page', 'mytheme_loop_shop_per_page');
function mytheme_loop_shop_per_page($value){ return -1; }
===
Some examples of this in action:
- Wordpress Codex on Applying Filter
- Private Online Dating Gallery Plugin on Todd and Clare {My plugin developed for Todd and Clare Dating}
- Another online dating plugin I developed {Use Ctrl + U to see line 382 of Code Dump for USA MAP in Dating Gallery}
In this case, setting the plugin's value globally, I could have also updated the database value for the plugin galley with update_option('images_per_page', -1);