Closed joshdarby closed 3 years ago
The solution to this would be to change this line
https://github.com/WPBuddy/largo/blob/825dce582300231d4723cad32e497b4824df5bc0/inc/wp-taxonomy-landing/functions/cftl-admin.php#L610
to sanitize_text_field
.
The reason it's not working now is because when all
is selected, it attempts to save the value as all
, which isn't an intval
so naturally it fails
Is all
a valid value for the per_page query parameter? It may be better to refactor this to a list of value => label, like 999 => __( 'All', 'largo' ),
Expected Behavior
When saving the
Posts per page
option on the landing page builder, saving the "all" option should reflect as such on page refresh.Actual Behavior
Saving "all" doesn't actually work and just defaults back to
5
. Might be because the actual amount saved is0
? Might be something else.https://github.com/WPBuddy/largo/blob/825dce582300231d4723cad32e497b4824df5bc0/inc/wp-taxonomy-landing/functions/cftl-admin.php#L433-L445
Steps to Reproduce the Problem