Home / Admin / Filter Music Promoter Age Restriction | Display Eventbrite Events
Duplicate Snippet

Embed Snippet on Your Site

Filter Music Promoter Age Restriction | Display Eventbrite Events

For Eventbrite music promoters only. Age restriction text is displayed unless it is set in Eventbrite to all_ages, in which case nothing is shown.

If you want to customise this and display text such as ‘All ages’, this filter can be used.

(Note this code snippet applies for "Display Eventbrite Events Plugin" available here: https://fullworksplugins.com/products/widget-for-eventbrite/ )

Code Preview
php
<?php
add_filter(
	'wfea_age_restriction',
	function ( $output, $age ) {
		if ( 'all_ages' === $age ) {
			$output = 'All ages';
		}
		return $output;
	},
	10, // filter priority
	2 // number of args to filter
);

Comments

Add a Comment