Skip to:
Content

Changeset 6402


Ignore:
Timestamp:
10/13/12 07:29:33 (18 months ago)
Author:
r-a-y
Message:

Theme Compat:

  • In bp_core_no_access(), change the 'mode' argument to 2 so it uses wp-login.php if bp_enable_theme_compat() is true.
  • This was done because accessing a restricted item like /members/USERNAME/settings/ did not show the login form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r6355 r6402  
    459459 
    460460    $defaults = array( 
    461         'mode'     => '1',                  // 1 = $root, 2 = wp-login.php 
    462         'redirect' => $redirect_url,        // the URL you get redirected to when a user successfully logs in 
    463         'root'     => bp_get_root_domain(), // the landing page you get redirected to when a user doesn't have access 
     461        'mode'     => bp_enable_theme_compat() ? 2 : 1, // 1 = $root, 2 = wp-login.php 
     462        'redirect' => $redirect_url,                    // the URL you get redirected to when a user successfully logs in 
     463        'root'     => bp_get_root_domain(),         // the landing page you get redirected to when a user doesn't have access 
    464464        'message'  => __( 'You must log in to access the page you requested.', 'buddypress' ) 
    465465    ); 
     
    472472     * @ignore Ignore these filters and use 'bp_core_no_access' above 
    473473     */ 
    474     $mode       = apply_filters( 'bp_no_access_mode',     $mode,     $root,     $redirect, $message ); 
    475     $redirect   = apply_filters( 'bp_no_access_redirect', $redirect, $root,     $message,  $mode    ); 
    476     $root       = apply_filters( 'bp_no_access_root',     $root,     $redirect, $message,  $mode    ); 
    477     $message    = apply_filters( 'bp_no_access_message',  $message,  $root,     $redirect, $mode    ); 
    478     $root       = trailingslashit( $root ); 
     474    $mode     = apply_filters( 'bp_no_access_mode',     $mode,     $root,     $redirect, $message ); 
     475    $redirect = apply_filters( 'bp_no_access_redirect', $redirect, $root,     $message,  $mode    ); 
     476    $root     = apply_filters( 'bp_no_access_root',     $root,     $redirect, $message,  $mode    ); 
     477    $message  = apply_filters( 'bp_no_access_message',  $message,  $root,     $redirect, $mode    ); 
     478    $root     = trailingslashit( $root ); 
    479479 
    480480    switch ( $mode ) { 
Note: See TracChangeset for help on using the changeset viewer.