Fix sanitization text

This commit is contained in:
Champ Camba
2022-11-02 12:32:02 +08:00
parent 096a1caf27
commit 88a9f6c7db
+1 -1
View File
@@ -45,7 +45,7 @@ if ( count( $args['view_types'] ) == 1 ) {
} else {
$args['default_view'] = ! empty( $args['default_view'] ) ? $args['default_view'] : $args['view_types'][0];
$default_view = $args['default_view'];
$current_view = ( ! empty( $_GET[ 'view_type_' . $unique_hash ] ) && in_array( $_GET[ 'view_type_' . $unique_hash ], $args['view_types'] ) ) ? $_GET[ 'view_type_' . $unique_hash ] : $args['default_view'];
$current_view = ( ! empty( $_GET[ 'view_type_' . $unique_hash ] ) && in_array( $_GET[ 'view_type_' . $unique_hash ], $args['view_types'] ) ) ? sanitize_text_field( $_GET[ 'view_type_' . $unique_hash ] ) : $args['default_view'];
}
// Sorting