Created
March 3, 2020 19:46
-
-
Save rafaehlers/942badeb63fbb8e3047fa594b9194495 to your computer and use it in GitHub Desktop.
Add support for Polish alphabet in A-Z filters
This file contains hidden or 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 | |
| add_filter( 'gravityview_az_entry_filter_localization', 'add_polish_gravityview_az_entry_filter_localization' ); | |
| function add_polish_gravityview_az_entry_filter_localization( $languages = array() ) { | |
| $languages['pl_PL'] = __( 'Polish', 'gravityview-az-filters' ); | |
| return $languages; | |
| } | |
| add_filter( 'gravityview_alphabets', 'add_polish_alphabet' ); | |
| function add_polish_alphabet( $alphabet = array() ) { | |
| $alphabet['pl_PL'] = array('A','Ą','B','C','Ć','D','E','Ę','F','G','H','I','J','K','L','Ł','M','N','Ń','O','Ó','P','R','S','Ś','T','U','W','Y','Z','Ź','Ż'); | |
| return $alphabet; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment