-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Site Editor: Update hrefs to not specifically refer to themes.php?page=gutenberg-edit-site #36705
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,23 +82,24 @@ const NavigationPanel = ( { isOpen, setIsOpen, activeTemplateType } ) => { | |
<NavigationGroup title={ __( 'Editor' ) }> | ||
<NavigationItem | ||
title={ __( 'Site' ) } | ||
href={ addQueryArgs( '', { | ||
page: 'gutenberg-edit-site', | ||
href={ addQueryArgs( window.location.href, { | ||
postId: undefined, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having to reset There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah a router would be nice 😀 |
||
postType: undefined, | ||
} ) } | ||
/> | ||
<NavigationItem | ||
title={ __( 'Templates' ) } | ||
item="wp_template" | ||
href={ addQueryArgs( '', { | ||
page: 'gutenberg-edit-site', | ||
href={ addQueryArgs( window.location.href, { | ||
postId: undefined, | ||
postType: 'wp_template', | ||
} ) } | ||
/> | ||
<NavigationItem | ||
title={ __( 'Template Parts' ) } | ||
item="wp_template_part" | ||
href={ addQueryArgs( '', { | ||
page: 'gutenberg-edit-site', | ||
href={ addQueryArgs( window.location.href, { | ||
postId: undefined, | ||
postType: 'wp_template_part', | ||
} ) } | ||
/> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be easier if we use
window.location.pathname
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most links in WP Admin use absolute, not relative, URLs, so I say let's do that. (Also I don't want to wait for CI again 😂.)