For anyone else bewildered by the update simply breaking their site, here are some things I have worked out but which I can't find documented anywhere:
- The settings tab moved from being within Input Filters (at admin/settings/filters/customfilter) to its own settings page (at admin/settings/customfilter)
- Whereas before any replacement PHP needed to return a value, now it needs to set $result = that value.
- Whereas before you could* treat $vars as an array, now you must treat it as an object. That means $vars['option_chosen'] now needs to be $vars->option_chosen and so on. (In 6.x-2.x apparently $vars must be renamed $customfilter, just as a heads-up). If you are getting white-screen-of-death errors, this may be what is causing it.
(* This may have been an undocumented and unintended feature.)
In future, it would be great if such significant changes to functionality could be made very obvious in the readme files etc. Thanks.
Comments
Comment #1
apadernoComment #2
apadernoI updated the file README.txt, and added a reference to the constant
CUSTOMFILTER_API
.If the file needs to be updated, please feel free to re-open this report.
Comment #3
apadernoFYI: version 6.x-2 allows to use the variable
$customfilter
as it would be an array;$customfilter->info
and$customfilter['info']
return the same value (NULL
in the case the property has not been previously set).