Changeset 9664 for trunk/src/bp-core/bp-core-catchuri.php
- Timestamp:
- 03/31/2015 04:19:19 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-catchuri.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-catchuri.php
r9559 r9664 56 56 $path = esc_url( $_SERVER['REQUEST_URI'] ); 57 57 58 // Filter the path 58 /** 59 * Filters the BuddyPress global URI path. 60 * 61 * @since BuddyPress (1.0.0) 62 * 63 * @param string $path Path to set. 64 */ 59 65 $path = apply_filters( 'bp_uri', $path ); 60 66 … … 328 334 $retval = true; 329 335 336 /** 337 * Filters whether or not root profiles are enabled and allowed. 338 * 339 * @since BuddyPress (1.6.0) 340 * 341 * @param bool $retval Whether or not root profiles are available. 342 */ 330 343 return apply_filters( 'bp_core_enable_root_profiles', $retval ); 331 344 } … … 371 384 } 372 385 373 // Filter the template locations so that plugins can alter where they are located 386 /** 387 * Filters the template locations. 388 * 389 * Allows plugins to alter where the template files are located. 390 * 391 * @since BuddyPress (1.1.0) 392 * 393 * @param string $template Located template path. 394 * @param array $filtered_templates Array of templates to attempt to load. 395 */ 374 396 $located_template = apply_filters( 'bp_located_template', $template, $filtered_templates ); 375 397 if ( !empty( $located_template ) ) { … … 380 402 $wp_query->is_404 = false; 381 403 404 /** 405 * Fires before the loading of a located template file. 406 * 407 * @since BuddyPress (1.6.0) 408 * 409 * @param string $located_template Template found to be loaded. 410 */ 382 411 do_action( 'bp_core_pre_load_template', $located_template ); 383 412 413 /** 414 * Filters the selected template right before loading. 415 * 416 * @since BuddyPress (1.1.0) 417 * 418 * @param string $located_template Template found to be loaded. 419 */ 384 420 load_template( apply_filters( 'bp_load_template', $located_template ) ); 385 421 422 /** 423 * Fires after the loading of a located template file. 424 * 425 * @since BuddyPress (1.6.0) 426 * 427 * @param string $located_template Template found that was loaded. 428 */ 386 429 do_action( 'bp_core_post_load_template', $located_template ); 387 430 … … 402 445 } 403 446 447 /** 448 * Fires if there are no found templates to load and theme compat is needed. 449 * 450 * @since BuddyPress (1.7.0) 451 */ 404 452 do_action( 'bp_setup_theme_compat' ); 405 453 } … … 411 459 function bp_core_catch_profile_uri() { 412 460 if ( !bp_is_active( 'xprofile' ) ) { 461 462 /** 463 * Filters the path to redirect users to if XProfile is not enabled. 464 * 465 * @since BuddyPress (1.0.0) 466 * 467 * @param string $value Path to redirect users to. 468 */ 413 469 bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) ); 414 470 } … … 473 529 474 530 $r = wp_parse_args( $args, $defaults ); 531 532 /** 533 * Filters the arguments used for user redirecting when visiting access controlled areas. 534 * 535 * @since BuddyPress (1.6.0) 536 * 537 * @param array $r Array of parsed arguments for redirect determination. 538 */ 475 539 $r = apply_filters( 'bp_core_no_access', $r ); 476 540 extract( $r, EXTR_SKIP ); … … 529 593 global $error; 530 594 595 /** 596 * Filters the error message for wp-login.php when needing to log in before accessing. 597 * 598 * @since BuddyPress (1.5.0) 599 * 600 * @param string $value Error message to display. 601 * @param string $value URL to redirect user to after successful login. 602 */ 531 603 $error = apply_filters( 'bp_wp_login_error', __( 'You must log in to access the page you requested.', 'buddypress' ), $_REQUEST['redirect_to'] ); 532 604 … … 555 627 function bp_redirect_canonical() { 556 628 629 /** 630 * Filters whether or not to do canonical redirects on BuddyPress URLs. 631 * 632 * @since BuddyPress (1.6.0) 633 * 634 * @param bool $value Whether or not to do canonical redirects. Default true. 635 */ 557 636 if ( !bp_is_blog_page() && apply_filters( 'bp_do_redirect_canonical', true ) ) { 558 637 // If this is a POST request, don't do a canonical redirect. … … 655 734 // the members directory to avoid redirect loops 656 735 } elseif ( bp_is_register_page() && 'register' == $front_page_component && is_user_logged_in() ) { 736 737 /** 738 * Filters the logged in register page redirect URL. 739 * 740 * @since BuddyPress (1.5.1) 741 * 742 * @param string $value URL to redirect logged in members to. 743 */ 657 744 $bp->canonical_stack['canonical_url'] = apply_filters( 'bp_loggedin_register_page_redirect_to', bp_get_members_directory_permalink() ); 658 745 } … … 696 783 } 697 784 785 /** 786 * Filters the canonical url of the current page. 787 * 788 * @since BuddyPress (1.6.0) 789 * 790 * @param string $canonical_url Canonical URL of the current page. 791 * @param array $args Array of arguments to help determine canonical URL. 792 */ 698 793 return apply_filters( 'bp_get_canonical_url', $canonical_url, $args ); 699 794 } … … 714 809 } 715 810 811 /** 812 * Filters the URL as requested on the current page load by the user agent. 813 * 814 * @since BuddyPress (1.7.0) 815 * 816 * @param string $value Requested URL string. 817 */ 716 818 return apply_filters( 'bp_get_requested_url', $bp->canonical_stack['requested_url'] ); 717 819 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)