Skip to content

Commit

Permalink
Add redirect for Categories and Tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtr committed Dec 11, 2024
1 parent cf55dea commit 860e3ee
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion client/my-sites/site-settings/settings-writing/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import page from '@automattic/calypso-router';
import { makeLayout, render as clientRender } from 'calypso/controller';
import {
makeLayout,
render as clientRender,
redirectIfDuplicatedView as _redirectIfDuplicatedView,
} from 'calypso/controller';
import { navigation, siteSelection, sites } from 'calypso/my-sites/controller';
import { setScroll, siteSettings } from 'calypso/my-sites/site-settings/settings-controller';
import { taxonomies, writing } from './controller';

const redirectIfDuplicatedView = ( context, next ) => {
_redirectIfDuplicatedView( `edit-tags.php?taxonomy=${ context.params.taxonomy }` )(
context,
next
);
};

export default function () {
page(
'/settings/writing/:site_id',
Expand All @@ -20,6 +31,7 @@ export default function () {
page(
'/settings/taxonomies/:taxonomy/:site_id',
siteSelection,
redirectIfDuplicatedView,
navigation,
setScroll,
taxonomies,
Expand Down

0 comments on commit 860e3ee

Please sign in to comment.