Disable Comments icon
Security

Disable Comments hooks reference

  • By WPDeveloper
  • v2.9.1
  • Updated

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.

functions.phpyour child theme
// 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

  • disable-comments.php line 2112
    /**
     * Filter the list of known comment types shown in the "Enable Certain Comment
     * Types" UI
     */
    apply_filters( 'disable_comments_known_comment_types', $known_types );
  • disable-comments.php line 563
    /**
     * Filters the sites purged after a network-wide settings change.
     */
    apply_filters( 'disable_comments_purge_blog_ids', $blog_ids );
  • disable-comments.php line 506
    /**
     * Fires when Disable Comments has changed what the front end renders.
     */
    do_action( 'disable_comments_purge_caches' );
  • disable-comments.php line 3093
    /**
     * Filter whether the review prompt may be shown at all.
     */
    apply_filters( 'disable_comments_show_review_prompt', true );
  • disable-comments.php line 529
    do_action( 'breeze_clear_all_cache' );
  • disable-comments.php line 1157
    apply_filters( 'disable_comments_count_blocked_attempts', true );
  • views/settings.php line 8
    do_action( 'disable_comments_notice' );
  • disable-comments.php line 525
    do_action( 'litespeed_purge_all' );
  • disable-comments.php line 527
    do_action( 'rt_nginx_helper_purge_all' );
  • disable-comments.php line 531
    do_action( 'wphb_clear_page_cache' );
  • includes/class-plugin-usage-tracker.php line 793
    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: