Changeset 4920 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 08/03/2011 09:03:41 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-catchuri.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r4907 r4920 38 38 39 39 // Don't catch URIs on non-root blogs unless multiblog mode is on 40 if ( !bp_is_root_blog() && !bp_is_multiblog_mode() ) {40 if ( !bp_is_root_blog() && !bp_is_multiblog_mode() ) 41 41 return false; 42 }43 42 44 43 // Fetch all the WP page names for each component 45 44 if ( empty( $bp->pages ) ) 46 $bp->pages = bp_core_get_ page_names();45 $bp->pages = bp_core_get_directory_pages(); 47 46 48 47 // Ajax or not? … … 78 77 $bkey = array_search( $chunk, $bp_uri ); 79 78 80 if ( $bkey !== false ) 79 if ( $bkey !== false ) { 81 80 unset( $bp_uri[$bkey] ); 81 } 82 82 83 83 $bp_uri = array_values( $bp_uri ); … … 115 115 if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_on_front' ) && empty( $bp_uri ) ) { 116 116 $post = get_post( get_option( 'page_on_front' ) ); 117 if ( !empty( $post ) ) 117 if ( !empty( $post ) ) { 118 118 $bp_uri[0] = $post->post_name; 119 } 119 120 } 120 121 … … 311 312 $object_id = 0; 312 313 foreach ( (array)$bp->pages as $page ) { 313 if ( isset( $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) && $page->name == $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) 314 if ( isset( $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) && $page->name == $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) { 314 315 $object_id = $page->id; 316 } 315 317 } 316 318 … … 397 399 398 400 $defaults = array( 399 'mode' => '1',// 1 = $root, 2 = wp-login.php400 'message' => __( 'You must log in to access the page you requested.', 'buddypress' ),401 'redirect' => wp_guess_url(), // the URL you get redirected to when a user successfully logs in402 'root' => $bp->root_domain // the landing page you get redirected to when a user doesn't have access401 'mode' => '1', // 1 = $root, 2 = wp-login.php 402 'message' => __( 'You must log in to access the page you requested.', 'buddypress' ), 403 'redirect' => wp_guess_url(), // the URL you get redirected to when a user successfully logs in 404 'root' => $bp->root_domain // the landing page you get redirected to when a user doesn't have access 403 405 ); 404 406 … … 421 423 bp_core_redirect( $root ); 422 424 } 423 break; 425 426 break; 424 427 425 428 // Redirect to root with "redirect_to" parameter … … 438 441 439 442 bp_core_redirect( $url ); 440 break; 443 444 break; 441 445 } 442 446 }
Note: See TracChangeset
for help on using the changeset viewer.