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

Navigation: change navigation link variation scope to block to avoid cluttering the inserter #35056

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,39 @@ const fallbackVariations = [
title: __( 'Custom Link' ),
description: __( 'A link to a custom URL.' ),
attributes: {},
scope: [ 'block' ],
},
{
name: 'post',
icon: postIcon,
title: __( 'Post Link' ),
description: __( 'A link to a post.' ),
attributes: { type: 'post', kind: 'post-type' },
scope: [ 'block' ],
},
{
name: 'page',
icon: pageIcon,
title: __( 'Page Link' ),
description: __( 'A link to a page.' ),
attributes: { type: 'page', kind: 'post-type' },
scope: [ 'block' ],
},
{
name: 'category',
icon: categoryIcon,
title: __( 'Category Link' ),
description: __( 'A link to a category.' ),
attributes: { type: 'category', kind: 'taxonomy' },
scope: [ 'block' ],
},
{
name: 'tag',
icon: tagIcon,
title: __( 'Tag Link' ),
description: __( 'A link to a tag.' ),
attributes: { type: 'tag', kind: 'taxonomy' },
scope: [ 'block' ],
},
];

Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ function build_variation_for_navigation_link( $entity, $kind ) {
'type' => $entity->name,
'kind' => $kind,
),
'scope' => array( 'block' ),
);

// Tweak some value for the variations.
Expand Down