The hook does not work

Plug in development and release
reply
whitenight
Posts: nine
Registration time: 17:23, April 12, 2010

The hook does not work

Posts from whitenight »

I encountered some problems when making a plug-in
Create edit delete merge these four actions when you need to listen for classification operations

After reviewing the documentation and code, we found that Widget_Metas_Category_Edit is available
https://docs.typecho.org/plugins/hooks
/var/Widget/Metas/Category/Edit.php

Then I registered in activate()
Typecho_Plugin::factory('Widget_Metas_Category_Edit')->insert = array('x_Plugin', 'handleInsert');
Typecho_Plugin::factory('Widget_Metas_Category_Edit')->update = array('x_Plugin', 'handleUpdate');
Typecho_Plugin::factory('Widget_Metas_Category_Edit')->delete = array('x_Plugin', 'handleDelete');

But after several days of testing, it is found that Widget_Metas_Category_Edit does not work
I have to write the method in activate(), which will take effect once when the plug-in is activated. It does not achieve the effect of automatic execution of monitoring
Or other ways to give advice
reply