Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate setting for getPostLinkProps and prefer stable naming #57535

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove duplicate setting for getPostLinkProps and prefer stable naming
  • Loading branch information
talldan committed Jan 4, 2024
commit 296c3adbf03db51e9b70e5c04b85ffdc653b804b
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 @@ -51,6 +51,7 @@ const BLOCK_EDITOR_SETTINGS = [
'fontSizes',
'gradients',
'generateAnchors',
'getPostLinkProps',
'hasFixedToolbar',
'hasInlineToolbar',
'isDistractionFree',
Expand All @@ -75,7 +76,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 @@ -144,7 +141,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
userPatternCategories: getUserPatternCategories(),
restBlockPatterns: getBlockPatterns(),
restBlockPatternCategories: getBlockPatternCategories(),
getPostLinkProps: postLinkProps,
};
},
[ postType, postId ]
Expand Down Expand Up @@ -253,7 +249,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
? [ [ 'core/navigation', {}, [] ] ]
: settings.template,
__experimentalSetIsInserterOpened: setIsInserterOpened,
__experimentalGetPostLinkProps: getPostLinkProps,
} ),
[
allowRightClickOverrides,
Expand All @@ -272,7 +267,6 @@ function useBlockEditorSettings( settings, postType, postId ) {
pageForPosts,
postType,
setIsInserterOpened,
getPostLinkProps,
]
);
}
Expand Down
Loading