Created
September 20, 2022 07:51
-
-
Save alanef/c56b076d5ca79e122cc77f4da3b60633 to your computer and use it in GitHub Desktop.
Age Restriction Text Filter
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
| 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