I have a text field which includes a URL.
$url = get_field('global_contrib_url', 'options');
I have parsed the URL to identify the host.
$contrib_url = parse_url($url);
$contrib_domain = $contrib_url['scheme'] . "://" . $contrib_url['host'];
Then I set up conditional statements to compare that domain to the value in the field:
if($contrib_domain == 'https://secure.example1.com'):
elseif($contrib_domain == 'https://secure.example2.com'):
elseif($contrib_domain == 'https://donate.example3.com'):
endif;
However, unique code I have for source
in example3.com
conditional statement shows up as the source
for either example1.com
or example2.com
and I cannot figure out why.