Move ACF initializer to an event listener