Skip to content

Commit

Permalink
Remove duplicate setting for getPostLinkProps and prefer stable naming (
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan authored Jan 5, 2024
1 parent 946e056 commit 915296f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions packages/block-library/src/block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ export default function ReusableBlockEdit( {
innerBlocks: blocks,
userCanEdit: canEdit,
getBlockEditingMode: editingMode,
getPostLinkProps:
getSettings().__experimentalGetPostLinkProps,
getPostLinkProps: getSettings().getPostLinkProps,
};
},
[ patternClientId, ref ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const BLOCK_EDITOR_SETTINGS = [
'fontSizes',
'gradients',
'generateAnchors',
'getPostLinkProps',
'hasFixedToolbar',
'hasInlineToolbar',
'isDistractionFree',
Expand All @@ -74,7 +75,6 @@ const BLOCK_EDITOR_SETTINGS = [
'__unstableIsBlockBasedTheme',
'__experimentalArchiveTitleTypeLabel',
'__experimentalArchiveTitleNameLabel',
'__experimentalGetPostLinkProps',
];

/**
Expand All @@ -100,7 +100,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
userPatternCategories,
restBlockPatterns,
restBlockPatternCategories,
getPostLinkProps,
} = useSelect(
( select ) => {
const isWeb = Platform.OS === 'web';
Expand All @@ -113,8 +112,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
getBlockPatterns,
getBlockPatternCategories,
} = select( coreStore );
const { getPostLinkProps: postLinkProps } =
select( editorStore ).getEditorSettings();
const { get } = select( preferencesStore );

const siteSettings = canUser( 'read', 'settings' )
Expand Down Expand Up @@ -145,7 +142,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
userPatternCategories: getUserPatternCategories(),
restBlockPatterns: getBlockPatterns(),
restBlockPatternCategories: getBlockPatternCategories(),
getPostLinkProps: postLinkProps,
};
},
[ postType, postId ]
Expand Down Expand Up @@ -257,7 +253,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
? [ [ 'core/navigation', {}, [] ] ]
: settings.template,
__experimentalSetIsInserterOpened: setIsInserterOpened,
__experimentalGetPostLinkProps: getPostLinkProps,
} ),
[
allowRightClickOverrides,
Expand All @@ -278,7 +273,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
pageForPosts,
postType,
setIsInserterOpened,
getPostLinkProps,
]
);
}
Expand Down

0 comments on commit 915296f

Please sign in to comment.