Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created November 5, 2019 14:03
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 Pebblo/c45dd0ab5de7d99135d0154c168b54b2 to your computer and use it in GitHub Desktop.
Save Pebblo/c45dd0ab5de7d99135d0154c168b54b2 to your computer and use it in GitHub Desktop.
<?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