Ive taken a copy of the skip rule to get me started and Ive renamed everything as appropriate. But the rule is being triggered from elsewhere. What I mean is If I try to echo out the $plugin value within the run rule its not giving the expected value - its "csvimultireplace" instead of my custom name "csviscswap"
I'm not sure why its getting csvimultireplace as the rule I copied was actually the 'skip' rule.
so this new rule I'm trying to write is actualy triggering on Another field instead of the one its assigned to. weird
Just to clarify...
public function runRule($plugin, $settings, $field, $fields)
{
echo $this->id;
echo $plugin;
jexit();
returns
csviscswap & csvimultireplace... 2 different names
Ah - User Error. I see that the plugins run all the time? therefore I was trying to get the values of $plugin in the wrong place. ie outside the if statement when My actual plugin was called.
so should have been
public function runRule($plugin, $settings, $field, $fields)
{
if ($plugin === $this->id && !empty($settings))
{
echo $this->id;
echo $plugin;
jexit();
}}