Disable Comments 2.9.1 has 6 actions and 5 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Disable Comments fires an action
add_action( 'disable_comments_purge_caches', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Disable Comments is about to use
add_filter( 'disable_comments_known_comment_types', function( $known_types ) {
// Change $known_types here.
return $known_types;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter the list of known comment types shown in the "Enable Certain Comment * Types" UI */ apply_filters( 'disable_comments_known_comment_types', $known_types ); -
/** * Filters the sites purged after a network-wide settings change. */ apply_filters( 'disable_comments_purge_blog_ids', $blog_ids ); -
/** * Fires when Disable Comments has changed what the front end renders. */ do_action( 'disable_comments_purge_caches' ); -
/** * Filter whether the review prompt may be shown at all. */ apply_filters( 'disable_comments_show_review_prompt', true ); -
breeze_clear_all_cache
actiondo_action( 'breeze_clear_all_cache' ); -
apply_filters( 'disable_comments_count_blocked_attempts', true ); -
disable_comments_notice
actiondo_action( 'disable_comments_notice' ); -
litespeed_purge_all
actiondo_action( 'litespeed_purge_all' ); -
rt_nginx_helper_purge_all
actiondo_action( 'rt_nginx_helper_purge_all' ); -
wphb_clear_page_cache
actiondo_action( 'wphb_clear_page_cache' ); -
apply_filters( "wpins_form_text_{$this->plugin_name}", $form );
Generated from Disable Comments's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: