Skip to content

Commit

Permalink
Remove open in new tab from link preview
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Feb 6, 2024
1 parent 01e31f0 commit 61d3d03
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
19 changes: 0 additions & 19 deletions packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,25 +427,6 @@ function LinkControl( {
onEditClick={ () => setIsEditingLink( true ) }
hasRichPreviews={ hasRichPreviews }
hasUnlinkControl={ shownUnlinkControl }
additionalControls={ () => {
// Expose the "Opens in new tab" settings in the preview
// as it is the most common setting to change.
if (
settings?.find(
( setting ) => setting.id === 'opensInNewTab'
)
) {
return (
<LinkSettings
value={ internalControlValue }
settings={ settings?.filter(
( { id } ) => id === 'opensInNewTab'
) }
onChange={ onChange }
/>
);
}
} }
onRemove={ () => {
onRemove();
setIsEditingLink( true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default function LinkPreview( {
hasRichPreviews = false,
hasUnlinkControl = false,
onRemove,
additionalControls,
} ) {
// Avoid fetching if rich previews are not desired.
const showRichPreviews = hasRichPreviews ? value?.url : null;
Expand Down Expand Up @@ -144,7 +143,6 @@ export default function LinkPreview( {
/>
<ViewerSlot fillProps={ value } />
</div>
{ additionalControls && additionalControls() }
</div>
);
}

0 comments on commit 61d3d03

Please sign in to comment.