如何通过remove_action挂钩删除“ comments_like_dislike”函数?

时间:2018-12-04 14:43:51

标签: wordpress

我尝试了以下代码:

limit = int(input())
total = sum(sorteddf['hour_extra'])
dataset = enumerate(sorteddf['hour_extra'])
for index, i in dataset:
sorteddf['hour_extra'][index] += 1
if index == limit-1:
break
print(sorteddf['hour_extra'])

图片:

enter image description here

1 个答案:

答案 0 :(得分:0)

在子主题functions.php文件中添加:

add_filter( 'init', 'remove_my_action');
function remove_my_action() { 
    remove_filter("comment_text",array("CLD_Comments_Hooks","comments_like_dislike"),200,2);
}

参考:remove_action