Block Cleanup

  • JNext lesson
  • KPrevious lesson
  • FSearch lessons
  • EscClear search

Overview

Removes WordPress block-specific CSS classes from frontend output to reduce HTML bloat and allow for cleaner, custom styling.

Removable Block Classes

The module provides toggles to remove the following WordPress block CSS classes:

  • Headingwp-block-heading
  • Listwp-block-list
  • Imagewp-block-image
  • Paragraphwp-block-paragraph
  • Quotewp-block-quote
  • Tablewp-block-table
  • Groupwp-block-group
  • Columnswp-block-columns, wp-block-column
  • Buttonswp-block-buttons, wp-block-button

Developer Filters

Developers can extend the cleanup functionality using the functionalities_block_cleanup_classes filter to add additional classes for removal:

add_filter( 'functionalities_block_cleanup_classes', function( $classes ) {
  $classes[] = 'wp-block-gallery';
  return $classes;
});

Configuration

Block Cleanup Settings

The plugin includes a settings interface where users can selectively toggle which block classes are removed from the frontend output.