diff --git a/packages/editor/src/bindings/post-meta.js b/packages/editor/src/bindings/post-meta.js index 9071edf98c1588..002e99b4758781 100644 --- a/packages/editor/src/bindings/post-meta.js +++ b/packages/editor/src/bindings/post-meta.js @@ -4,28 +4,17 @@ import { store as coreDataStore } from '@wordpress/core-data'; import { _x } from '@wordpress/i18n'; -/** - * Internal dependencies - */ -import { store as editorStore } from '../store'; - export default { name: 'core/post-meta', label: _x( 'Post Meta', 'block bindings source' ), - usesContext: [ 'postId', 'postType' ], getPlaceholder( { args } ) { return args.key; }, getValue( { select, context, args } ) { - const postId = - context?.postId || select( editorStore ).getCurrentPostId(); - const postType = - context?.postType || select( editorStore ).getCurrentPostType(); - return select( coreDataStore ).getEditedEntityRecord( 'postType', - postType, - postId + context?.postType, + context?.postId ).meta?.[ args.key ]; }, };