Any if statement will not work, as then you are still not telling the user what you are required to tell them, you are just saying this may happen - but not telling them if it will.
Yes, again, IANAL, but I'd naively assume it's
very much less of a legal problem to say, f.e.:
If you're accessing a thread that contains a [youtube] BBC tag, your PII will be sent to YouTube, Google, and Doubleclick, and here's their Privacy Policies.
(and then be wrong about 99% of threads), than to
not mention this fact to the users, which seems like an obvious disregard of the GDPR. (And, just to remind you, the GDPR doesn't apply to EU organizations and private site owners only, but to
everybody worldwide that is handling PII of EU/EEA citizens.)
(I'll take the safe route for now and disable the
[img] BBC in the forum I'm setting up, because it can include basically
any URL (and the focus is on text anyway)...)