Created
November 5, 2019 14:03
-
-
Save Pebblo/c45dd0ab5de7d99135d0154c168b54b2 to your computer and use it in GitHub Desktop.
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 //Please do not include the opening PHP tag if you already have one. | |
// This function removes any accents set on the Venues slugs so they can be used within values URLs. | |
add_filter( 'FHEE__EE_Register_CPTs__get_CPTs__cpts', 'dre_modify_visibility_of_event_espresso_cpt_in_admin' ); | |
function dre_modify_visibility_of_event_espresso_cpt_in_admin( $cpt_registry_array ) { | |
if ( isset( $cpt_registry_array['espresso_venues'] ) ) { | |
$cpt_registry_array['espresso_venues']['singular_slug'] = remove_accents($cpt_registry_array['espresso_venues']['singular_slug']); | |
$cpt_registry_array['espresso_venues']['plural_slug'] = remove_accents($cpt_registry_array['espresso_venues']['plural_slug']); | |
} | |
return $cpt_registry_array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment