Skip to content

Commit

Permalink
Add descriptions for custom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Feb 7, 2023
1 parent 92a6d70 commit b2045b4
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ export default function SidebarNavigationScreenTemplate( {
postType = 'wp_template',
} ) {
const { setCanvasMode } = unlock( useDispatch( editSiteStore ) );
const { getDescription, getTitle } = useEditedEntityRecord();
const description = getDescription();
const { getDescription, getTitle, record } = useEditedEntityRecord();
let description = getDescription();
if ( ! description && record.is_custom ) {
description = __(
'This is a custom template that can be applied manually to any Post or Page.'
);
}

return (
<SidebarNavigationScreen
path={ config[ postType ].path }
Expand Down

0 comments on commit b2045b4

Please sign in to comment.