Jump to content

Add some IPSLib function to check if an hook exists


teraßyte

Recommended Posts

Right now there is no defined to way check if an hook exists or is enabled unless you manually go through the whole cache and compare everything yourself manually in a foreach cycle, it would be useful to add 2 new functions with those specifics: I have seen quite a few modifications (and a couple of places in IPB too unless I remember wrong?) check each one in their own way if an hook exists in the cache to enable or not specific functions. Also both functions should cache the results in a static variable so that if the same values are checked again there's no additional checking done.

[*]A new function to retrieve an hook by his key (there's no need for an "is enabled" check since the hook won't even be in the cache if it's disabled) [*]A new function to retrieve ALL the hooks executed on a certain location: for example all skin overloaders on skin_global, or all library hooks on classPost, all template hooks on skin_global::globalTemplate, and so on.







Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...