Hooks & Filters - WordPress Style

edited February 2018 in Feature Requests


To make it easy for users & developers to modify & extend key parts of program-o, (eg: changing the wild-card resolution behaviour, adding additional aiml tags, whatever), for use in real/local applications, I have the following suggestion to make - i wonder if we could consider implementing WordPresss style hooks & filters.

A simple php class implementing a good analogue of that mechanism is – eg:


Advantages are many, including:

    • really small overhead in both extra code and extra run-time
    • really low coding overhead in retrospectively instrumenting existing code with appropriate hook/filter do-action calls
    • excellent flexibility for the user/applications developer in overriding key functionalities tat would otherwise be baked in/hard coded within original source code
    • still allows development, maintenance & support, of a single consistent, single baseline/version release
    • allows easier refactoring of existing core code, with core code itself deploying/shipping 'core' filters & 'hooks' packages

i believe implementing something like this could really speed up development and maintenance, plus, make the code much more accessible to other developers, especially in the open souce community - one just needs to look at the enormous expansion of the WordPress eco-sphere to see the benefits, not to mention 'commercial' spin-off potential (3rd party plugins etc) .

(By way of example, i am currently engaged in trying to integrate a parts-of-speech tagger + thesaurus + object database + neural net/SVM, 'intentions', 'moods', etc ... maybe if & when i get the chance i'l expand a bit on these ideas in separate threads - but they'd all be a lot more straigtforward using a hook & filter environment).

What do people think if this idea?

Sign In or Register to comment.