All features

Cherry Blossom feature

Security: Comments

Controls comment and ping availability across the site.

Controls comment and ping availability across the site.

Capabilities and extension points

Disables comments site-wide to close off the attack surface they bring

(spam, stored XSS, pingback abuse).

Can be re-enabled by a child theme, e.g.:

add_filter( 'cherry/blossom/disable_comments', '__return_false' );

Registers hooks for disabling comments.

Determines whether comments should be disabled site-wide.

Child themes can restore normal comment behaviour by hooking `cherry/blossom/disable_comments` and returning false.

  • return bool

Removes comment and trackback support from every post type.

Forces comments and pings closed for all content.

  • return bool Always false.

Redirects direct requests to the comments admin page.

Removes the comments menu item from the admin menu.

Removes the comments bubble from the admin bar.

  • param \WP_Admin_Bar $wp_admin_bar Admin bar instance.

Removes the recent comments widget from the dashboard.

Source reference

This editable reference page is based on the PHP documentation in security/class-comments.php.