Created
March 10, 2022 01:05
-
-
Save zackkatz/c4bdd2ce795e17dd9c0783dc072ee8e4 to your computer and use it in GitHub Desktop.
GravityView A-Z: Modify the collation so that filtering works for Polish L and Ł
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Override the default query collation for the letter comparison (Requires GravityView A-Z Filters version 1.3 or newer). | |
* @param null|string $collation_override The collation override for the query. | |
* @param string $query The MySQL query passed to the database. | |
* @return string | |
*/ | |
add_filter( 'gravityview/az_filter/collation', function ( $collation = null ) { | |
return 'utf8mb4_bin'; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment