CoreFiles by mySites.guru
route.js17 lines, 298 bytes, from wordpress-7.0-beta2.zip
Raw History Compare with 7.0-beta1
md5
a41d2985f6a6504d88c12d3a639b0e88
sha1
c735bc27601eb0070e6a6e898aacb815f0dc2933
sha256
41011dc58467fec6ade496f8aa1db830514012124f314db85cb7f41989c2e520
// routes/post/route.ts
import { redirect } from "@wordpress/route";
var route = {
  beforeLoad: ({ params }) => {
    throw redirect({
      throw: true,
      to: "/types/$type/list/$slug",
      params: {
        type: params.type,
        slug: "all"
      }
    });
  }
};
export {
  route
};

The same content is in 5 releases, WordPress 7.0-beta1 to 7.0-beta5. See them all, or every version of this file.