Skip to content

Commit

Permalink
Revert "Post editor: Require confirmation before removing Footnotes (#…
Browse files Browse the repository at this point in the history
…52277)"

This reverts commit e6426ea.
  • Loading branch information
priethor committed Jul 10, 2023
1 parent dabe354 commit d38e866
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ export function BlockRemovalWarningModal( { rules } ) {
<Modal
title={ __( 'Are you sure?' ) }
onRequestClose={ clearBlockRemovalPrompt }
style={ {
maxWidth: '40rem',
} }
>
{ blockNamesForPrompt.length === 1 ? (
<p>{ rules[ blockNamesForPrompt[ 0 ] ] }</p>
Expand Down
15 changes: 1 addition & 14 deletions packages/edit-post/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ import {
store as editorStore,
} from '@wordpress/editor';
import { useSelect, useDispatch } from '@wordpress/data';
import {
BlockBreadcrumb,
privateApis as blockEditorPrivateApis,
} from '@wordpress/block-editor';
import { BlockBreadcrumb } from '@wordpress/block-editor';
import { Button, ScrollLock, Popover } from '@wordpress/components';
import { useViewportMatch } from '@wordpress/compose';
import { PluginArea } from '@wordpress/plugins';
Expand Down Expand Up @@ -52,9 +49,6 @@ import WelcomeGuide from '../welcome-guide';
import ActionsPanel from './actions-panel';
import StartPageOptions from '../start-page-options';
import { store as editPostStore } from '../../store';
import { unlock } from '../../lock-unlock';

const { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );

const interfaceLabels = {
/* translators: accessibility text for the editor top bar landmark region. */
Expand All @@ -69,12 +63,6 @@ const interfaceLabels = {
footer: __( 'Editor footer' ),
};

const blockRemovalRules = {
'core/footnotes': __(
'The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.'
),
};

function Layout( { styles } ) {
const isMobileViewport = useViewportMatch( 'medium', '<' );
const isHugeViewport = useViewportMatch( 'huge', '>=' );
Expand Down Expand Up @@ -214,7 +202,6 @@ function Layout( { styles } ) {
<LocalAutosaveMonitor />
<EditPostKeyboardShortcuts />
<EditorKeyboardShortcutsRegister />
<BlockRemovalWarningModal rules={ blockRemovalRules } />
<SettingsSidebar />
<InterfaceSkeleton
isDistractionFree={ isDistractionFree && isLargeViewport }
Expand Down
3 changes: 0 additions & 3 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ const blockRemovalRules = {
'core/post-content': __(
'Post Content displays the content of a post or page.'
),
'core/footnotes': __(
'The Footnotes block displays all footnotes found in the content. Note that any footnotes in the content will persist after removing this block.'
),
};

export default function Editor( { isLoading } ) {
Expand Down

0 comments on commit d38e866

Please sign in to comment.