The current, or selected, values in your code are stored in $sorterby
and $posts
variables. The variable values are set by a ternary opertion – a one-line if-statement. The first part is the conditional check, the second part after question mark is the value setting, and after the colon is default value, which is used, if the conditional check fails / is false.
So just match the third part of the ternary operations with any key from the option arrays, $sorter_arr
and $posts_arr
, and you should be good to go.
$sorterby = ! empty( $_GET['select'] ) ? sanitize_text_field( wp_unslash( $_GET['select'] ) ) : 'title'; // title as default
$posts = ! empty( $_GET['per_page'] ) ? absint( $_GET['per_page'] ) : '100'; // 100 as default
BUT, do note that you shouldn’t make any direct changes to plugin or (parent) theme files (if the code above is from eihter one). Any changes you make will get wiped out next time the plugin or theme is updated. If the code is such that you can copy it to your child theme, then it is safe to edit and won’t get overwritten when updates are installed.