Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion includes/make-block/services/class-block-details.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public function get_block_slug_name(): string {
$block_class_name = $this->get_block_class_name();

// Remove the _Block suffix.
$block_class_name = str_replace( '_Block', '', $block_class_name );
if ( str_ends_with( $block_class_name, '_Block' ) ) {
// Remove the last 6 characters due to the underscore and the 5 characters of the suffix.
$block_class_name = substr( $block_class_name, 0, -6 );
}

return strtolower( str_replace( '_', '-', $block_class_name ) );
}
Expand Down