Skip to content

Commit

Permalink
Update parameter sanitizing for Archive template
Browse files Browse the repository at this point in the history
  • Loading branch information
ramram-mf committed Aug 13, 2024
1 parent c19b3cd commit b6658d2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,11 +434,11 @@

$records = new WP_Query( $args );
$records_count;
$records_current = ( $_GET['records'] ) ? $_GET['records'] : 8;
$records_current = ( $_GET['records'] ) ? intval($_GET['records']) : 8;
$records_total = $records->found_posts;

if ( isset( $_GET['records'] ) ):
$records_count = ( $_GET['records'] > $records_total ) ? $records_total : $_GET['records'];
$records_count = ( intval($_GET['records']) > $records_total ) ? $records_total : intval($_GET['records']);
else:
$records_count = ( $records_total < 8 ) ? $records_total : 8;
endif;
Expand Down

0 comments on commit b6658d2

Please sign in to comment.