From c3323054e0b661b707aa31c0a3ea16051c5f0fac Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:53:52 +1200 Subject: [PATCH] Plugin: Redirect deprecated Learn handbook to Training Team handbook See #2496 --- wp-content/plugins/wporg-learn/inc/redirects.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-content/plugins/wporg-learn/inc/redirects.php b/wp-content/plugins/wporg-learn/inc/redirects.php index 2cca1a39f..a52fd5fcb 100644 --- a/wp-content/plugins/wporg-learn/inc/redirects.php +++ b/wp-content/plugins/wporg-learn/inc/redirects.php @@ -14,7 +14,7 @@ * @return array The updated array of allowed redirect hosts. */ function wporg_learn_allowed_redirect_hosts( $hosts ) { - return array_merge( $hosts, array( 'wordpress.tv' ) ); + return array_merge( $hosts, array( 'wordpress.tv', 'make.wordpress.org' ) ); }; /** @@ -51,14 +51,15 @@ function wporg_learn_redirect_old_urls() { $redirects = array( // Source => Destination, any characters after the source will be appended to the destination. - '/workshop/' => '/tutorial/', - '/workshops' => '/tutorials', - '/social-learning' => '/online-workshops', - '/workshop-presenter-application' => '/tutorial-presenter-application', + '/handbook' => 'https://make.wordpress.org/training/handbook/', '/report-content-errors' => '/report-content-feedback', + '/social-learning' => '/online-workshops', '/tutorial/block-editor-01-basics/' => 'https://wordpress.tv/2021/06/18/shusei-toda-naoko-takano-block-editor-01-basics/', '/tutorial/block-editor-02-text-blocks/' => 'https://wordpress.tv/2021/06/03/shusei-toda-block-editor-02-text-blocks/', '/tutorial/ja-login-password-reset/' => 'https://wordpress.tv/2021/02/16/login-password-reset/', + '/workshop/' => '/tutorial/', + '/workshop-presenter-application' => '/tutorial-presenter-application', + '/workshops' => '/tutorials', ); // Use `REQUEST_URI` rather than `$wp->request`, to get the entire source URI including url parameters.