Skip to content

Instantly share code, notes, and snippets.

@alanef
Created September 20, 2022 07:51
Show Gist options
  • Select an option

  • Save alanef/c56b076d5ca79e122cc77f4da3b60633 to your computer and use it in GitHub Desktop.

Select an option

Save alanef/c56b076d5ca79e122cc77f4da3b60633 to your computer and use it in GitHub Desktop.
Age Restriction Text Filter
add_filter(
'wfea_age_restriction',
/**
* @param $output string filterable output
* @param $age string Eventbrite string or all_ages
*
* @return string filtered output
*
*/
function ( $output, $age ) {
if ( 'all_ages' === $age ) {
$output = 'All ages';
}
return $output;
},
10, // filter priority
2 // number of argss to filter
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment