Created
February 2, 2018 16:32
-
-
Save ryanshoover/d9d8063699f18528d75bc400f520ea93 to your computer and use it in GitHub Desktop.
WP Engine GeoIP - Remove slashed apostrophes
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 | |
| /** | |
| * Filters the WP Engine GeoIP location names. | |
| * Removes any slashes in the names. | |
| * | |
| * @param array $geos GeoIP-identified location names. | |
| * @return array GeoIP-identified location names without slashes. | |
| */ | |
| function myprefix_remove_geoip_slashes( $geos ) { | |
| return wp_unslash( $geos ); | |
| } | |
| add_filter( 'geoip_location_values', 'myprefix_remove_geoip_slashes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment