diff --git a/packages/editor/src/bindings/post-meta.js b/packages/editor/src/bindings/post-meta.js index f5b3b526dbfd4..287e9aeb09d71 100644 --- a/packages/editor/src/bindings/post-meta.js +++ b/packages/editor/src/bindings/post-meta.js @@ -25,4 +25,17 @@ export default { .getEditedEntityRecord( 'postType', postType, context.postId ) .meta?.[ args.key ]; }, + setValue( { registry, context, args, value } ) { + const postType = context.postType + ? context.postType + : registry.select( editorStore ).getCurrentPostType(); + registry + .dispatch( coreDataStore ) + .editEntityRecord( 'postType', postType, context.postId, { + meta: { + [ args.key ]: value, + }, + } ); + }, + lockAttributesEditing: false, };