$data->emails->add($email, false);
if (!$data->enabled || !$data->api_key) {
return $data->emails->itemAt($email);
}
$data->emails->add($email, false);
if (!$data->enabled || !$data->api_key) {
return $data->emails->itemAt($email);
}
// we add this
$allowedControllers = array(
'list_import', // import
'list_subscribers', // added from list area
'lists', // added from the subscribe forms
);
if (MW_IS_CLI || !in_array(Yii::app()->getController()->getId(), $allowedControllers)) {
return false;
}
Thing is those plugins were created when we didn't had certain hooks in the application so that we know what area calls the hook.why don't you use the above as the default on your plugin?