{"repo":"inpsyde/objects-hooks-remover","free":true,"listed":false,"github":"https://github.com/inpsyde/objects-hooks-remover","clone":"git clone https://github.com/inpsyde/objects-hooks-remover.git","description":"Package to remove WordPress hook callbacks that uses object methods or closures.","language":"PHP","stars":62,"topics":["wordpress","hook","php","closure"],"license":"GPL-2.0","category":"self-hosted-apps","readme_excerpt":"Object Hooks Remover Package to remove WordPress hook callbacks that use object methods or closures. --- What is this? WordPress plugin API has a partly incomplete implementation. add action and add filter accepts as \"callback\" any kind PHP callable: - named functions - static object methods - dynamic object methods - anonymous functions - invokable objects The functions to remove hooks, remove action and remove filter , works without issues only with named functions and static object methods (2 of the 5 types of callbacks). The remaining cases involving object instances remove action and remove filter can only be used when having access to the object instance that was used to add hooks, but many times that's not available. This package provides six functions that can be used to remove hooks that use object methods or closures even without having access to the original object instance. The package functions are: - Inpsyde\\remove object hook() - Inpsyde\\remove closure hook() - Inpsyde\\remove static method hook() - Inpsyde\\remove instance hook() - Inpsyde\\remove invokable hook() - Inpsyde\\remove all object hooks() You might notice there is no difference between action and filters because, especially in removing, there's absolutely no difference between the two. The return value of all the functions is the number of callbacks removed. --- Inpsyde\\remove object hook() This function is used to remove hook callbacks that use object methods. By default, it only targets dynamic metho","default_branch":null,"files":null,"tree":[],"storefront":"/r/inpsyde","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/inpsyde/objects-hooks-remover/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}