Skip to content

Commit

Permalink
Set lockEditing to false in pattern overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot committed Feb 7, 2024
1 parent 0807544 commit eef62cb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/use-bindings-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const createEditFunctionWithBindingsAttribute = () =>
settings.source
);

if ( source ) {
if ( source && source.useSource ) {
// Second argument (`updateMetaValue`) will be used to update the value in the future.
const {
placeholder,
Expand Down
2 changes: 2 additions & 0 deletions packages/editor/src/bindings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { dispatch } from '@wordpress/data';
* Internal dependencies
*/
import { unlock } from '../lock-unlock';
import patternOverrides from './pattern-overrides';
import postMeta from './post-meta';

const { registerBlockBindingsSource } = unlock( dispatch( blockEditorStore ) );
registerBlockBindingsSource( patternOverrides );
registerBlockBindingsSource( postMeta );
11 changes: 11 additions & 0 deletions packages/editor/src/bindings/pattern-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';

export default {
name: 'core/pattern-overrides',
label: __( 'Pattern Overrides' ),
useSource: null,
lockAttributesEditing: false,
};

0 comments on commit eef62cb

Please sign in to comment.