I'm trying to use the PHP String fun plug-in to evaluate whether a current entry belongs to a specific channel and then show/hide a register prompt depending upon that. So I have a snippet:
{sn_content_channels_closed} = "content_guides|content_videos|content_white-papers"
Then the channel in question is "content_white-papers", however the template code below fails to return TRUE 'unless' I place the {channel_name} variable somewhere else in the template in addition to here:
{if '{exp:phpstringfun function="substr_count" par1="{channel_name}"}{sn_content_channels_closed}{/exp:phpstringfun}'=='1'}
Of course I could do that but I'd like to understand why this doesn't work, Parse order... EE WTF... something else?