vtxyzzy
I’m already solve the problem but it was to complexly. In general I need to disable whole plugin for specific category (with slug “blog”). But any of default WP functions doesn’t works in the begin of plugin file, maybe thats because them should be used using add_filter or add_actions.
I wrote a function
function is_blog() {
$current_post_categs = get_the_category();
$is_blog = false;
foreach ($current_post_categs as $categ) {
if ($categ->category_nicename == 'blog' || $categ->slug == 'blog') {
$is_blog = true;
}
}
return $is_blog;
}
And now I’m use this function in the begin of any plugin function. For example:
my_function() {
if (is_blog()) return;
// function content
}
add_filter('get_comment_link', 'my_function');
It works, but there are many functions in this plugin and for each of them I’ve add “if (is_blog()) return;”.