Skip to content

Commit

Permalink
Template Part: Kebab case the title (#36764)
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Nov 23, 2021
1 parent 6e64edc commit 894fa30
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { find } from 'lodash';
import { find, kebabCase } from 'lodash';

/**
* WordPress dependencies
Expand Down Expand Up @@ -65,7 +65,7 @@ export default function TemplatePartPlaceholder( {
// block attributes.
const record = {
title,
slug: 'template-part',
slug: kebabCase( title ),
content: serialize( startingBlocks ),
// `area` is filterable on the server and defaults to `UNCATEGORIZED`
// if provided value is not allowed.
Expand Down

0 comments on commit 894fa30

Please sign in to comment.