Making WordPress.org

Changeset 11333


Ignore:
Timestamp:
11/17/2021 07:25:55 AM (2 years ago)
Author:
dd32
Message:

Support: Use https://wordpress.org/support/users/profile/edit/ to direct to the current users profile, to match the existing https://profiles.wordpress.org/profile/ shortcut.

Ammends [11330].
See #5830.

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-well-known.php

    r11330 r11333  
    1919
    2020    if ( '/.well-known/change-password' === $_SERVER['REQUEST_URI'] ) {
    21         wp_safe_redirect( 'https://wordpress.org/support/users/my-profile/edit/' );
     21        wp_safe_redirect( 'https://wordpress.org/support/users/profile/edit/' );
    2222        exit;
    2323    }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php

    r11331 r11333  
    313313     * Redirect legacy urls to their new permastructure.
    314314     *  - /users/$id & /profile/$slug to /users/$slug
    315      *  - /users/my-profile/* => /users/$slug/*
     315     *  - /users/profile/* => /users/$slug/*
    316316     *
    317317     * See also: Support_Compat in inc/class-support-compat.php
     
    345345        }
    346346
    347         if ( 'my-profile' === get_query_var( 'bbp_user' ) ) {
     347        if ( 'profile' === get_query_var( 'bbp_user' ) ) {
    348348            if ( is_user_logged_in() ) {
    349349                $user = wp_get_current_user();
    350                 $url  = str_replace( '/my-profile/', "/{$user->user_nicename}/", $_SERVER['REQUEST_URI'] );
     350                $url  = str_replace( '/profile/', "/{$user->user_nicename}/", $_SERVER['REQUEST_URI'] );
    351351            } else {
    352352                $url  = wp_login_url( home_url( $wp->request ) );
Note: See TracChangeset for help on using the changeset viewer.