WordPress.org

Make WordPress Core

Changeset 17668


Ignore:
Timestamp:
04/20/2011 08:19:50 PM (10 years ago)
Author:
ryan
Message:

Allow plugins to control user and network admin canonical redirects. fixes #17196

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/network/admin.php

    r17510 r17668  
    1616    wp_die( __( 'Multisite support is not enabled.' ) );
    1717
    18 if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) {
     18$redirect_network_admin_request = ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) );
     19$redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
     20if ( $redirect_network_admin_request ) {
    1921    wp_redirect( network_admin_url() );
    2022    exit;
    2123}
     24unset( $redirect_network_admin_request );
    2225?>
  • trunk/wp-admin/user/admin.php

    r17510 r17668  
    1717}
    1818
    19 if ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) ) {
     19$redirect_user_admin_request = ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) );
     20$redirect_user_admin_request = apply_filters( 'redirect_user_admin_request', $redirect_user_admin_request );
     21if ( $redirect_user_admin_request ) {
    2022    wp_redirect( user_admin_url() );
    2123    exit;
    2224}
     25unset( $redirect_user_admin_request );
     26
    2327?>
Note: See TracChangeset for help on using the changeset viewer.