Skip to content

Commit

Permalink
Disable editing in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot committed May 29, 2024
1 parent 3c21f6f commit 4011beb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/editor/src/bindings/post-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export default {
? context.postType
: select( editorStore ).getCurrentPostType();

// TODO: Check that editing is happening in the post editor and not a template.
// Check that editing is happening in the post editor and not a template.
if ( postType === 'wp_template' ) {
return true;
}

// Check that the custom field is not protected and available in the REST API.
const isFieldExposed =
Expand Down

0 comments on commit 4011beb

Please sign in to comment.