title: How to create hooks like in Wordpress for custom CMS?
body: <p>I was impressed when I found out WordPress hooks such as Actions and Filters, where you can modify or change your whole CMS functionality just from one custom function and its hook. I'm looking for the method or architecture pattern or even code example, which will explain how does it work. What do you have to write to your custom class (for example) to allow you to change some core features? No matter CMS or programming language. It could be WordPress or custom JS/PHP CMS.</p>