Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zackkatz/c4bdd2ce795e17dd9c0783dc072ee8e4 to your computer and use it in GitHub Desktop.
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 Ł
<?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