diff --git a/packages/block-library/src/navigation-link/block.json b/packages/block-library/src/navigation-link/block.json index 3d6d79f73bde2..0d02a4d924516 100644 --- a/packages/block-library/src/navigation-link/block.json +++ b/packages/block-library/src/navigation-link/block.json @@ -9,9 +9,6 @@ "type": "boolean", "default": false }, - "title": { - "type": "string" - }, "type": { "type": "string" }, diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index 69be4031cf403..4eb8924d8faa3 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -2,7 +2,7 @@ * External dependencies */ import classnames from 'classnames'; -import { escape, unescape, head } from 'lodash'; +import { escape, head } from 'lodash'; /** * WordPress dependencies @@ -16,7 +16,6 @@ import { PanelBody, Popover, TextareaControl, - TextControl, ToggleControl, ToolbarButton, ToolbarGroup, @@ -48,14 +47,7 @@ function NavigationLinkEdit( { insertLinkBlock, navigationBlockAttributes, } ) { - const { - label, - opensInNewTab, - title, - url, - nofollow, - description, - } = attributes; + const { label, opensInNewTab, url, nofollow, description } = attributes; /* * Navigation Block attributes. @@ -68,7 +60,6 @@ function NavigationLinkEdit( { } = navigationBlockAttributes; const link = { - title: title ? unescape( title ) : '', url, opensInNewTab, }; @@ -157,16 +148,6 @@ function NavigationLinkEdit( { - { - setAttributes( { title: titleValue } ); - } } - label={ __( 'Title Attribute' ) } - help={ __( - 'Provide more context about where the link goes.' - ) } - /> { @@ -258,7 +239,6 @@ function NavigationLinkEdit( { id, } = {} ) => setAttributes( { - title: escape( newTitle ), url: encodeURI( newURL ), label: ( () => { const normalizedTitle = newTitle.replace( diff --git a/packages/block-library/src/navigation/edit.js b/packages/block-library/src/navigation/edit.js index d3b38c43fa83a..448d190fdf591 100644 --- a/packages/block-library/src/navigation/edit.js +++ b/packages/block-library/src/navigation/edit.js @@ -113,7 +113,6 @@ function Navigation( { label: ! title.rendered ? __( '(no title)' ) : escape( title.rendered ), - title: ! title.raw ? __( '(no title)' ) : escape( title.raw ), opensInNewTab: false, } ) ); diff --git a/packages/block-library/src/navigation/index.php b/packages/block-library/src/navigation/index.php index 450c0ceba6224..4c39e13e4210d 100644 --- a/packages/block-library/src/navigation/index.php +++ b/packages/block-library/src/navigation/index.php @@ -195,9 +195,6 @@ function core_block_navigation_build_html( $attributes, $block, $colors, $font_s if ( isset( $block['attrs']['url'] ) ) { $html .= ' href="' . esc_url( $block['attrs']['url'] ) . '"'; } - if ( isset( $block['attrs']['title'] ) ) { - $html .= ' title="' . esc_attr( $block['attrs']['title'] ) . '"'; - } if ( isset( $block['attrs']['opensInNewTab'] ) && true === $block['attrs']['opensInNewTab'] ) { $html .= ' target="_blank" '; diff --git a/packages/e2e-tests/specs/editor/blocks/__snapshots__/navigation.test.js.snap b/packages/e2e-tests/specs/editor/blocks/__snapshots__/navigation.test.js.snap index 82aed4dc7aaef..b13411df2531c 100644 --- a/packages/e2e-tests/specs/editor/blocks/__snapshots__/navigation.test.js.snap +++ b/packages/e2e-tests/specs/editor/blocks/__snapshots__/navigation.test.js.snap @@ -2,18 +2,18 @@ exports[`Navigation allows a navigation menu to be created from an empty menu using a mixture of internal and external links 1`] = ` " - + - + " `; exports[`Navigation allows a navigation menu to be created using existing pages 1`] = ` " - + - + - + " `;