Changeset 8702 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 07/27/2014 05:01:01 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-functions.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r8701 r8702 705 705 * headers. Default: 302. 706 706 */ 707 function bp_core_redirect( $location , $status = 302 ) {707 function bp_core_redirect( $location = '', $status = 302 ) { 708 708 709 709 // On some setups, passing the value of wp_get_referer() may result in an 710 710 // empty value for $location, which results in an error. Ensure that we 711 711 // have a valid URL. 712 if ( empty( $location ) ) 712 if ( empty( $location ) ) { 713 713 $location = bp_get_root_domain(); 714 } 714 715 715 716 // Make sure we don't call status_header() in bp_core_do_catch_uri() as this … … 742 743 global $current_site; 743 744 744 if ( is_multisite() ) 745 if ( is_multisite() ) { 745 746 $site_path = $current_site->path; 746 else {747 } else { 747 748 $site_path = (array) explode( '/', home_url() ); 748 749 749 if ( count( $site_path ) < 2 ) 750 if ( count( $site_path ) < 2 ) { 750 751 $site_path = '/'; 751 else {752 } else { 752 753 // Unset the first three segments (http(s)://domain.com part) 753 754 unset( $site_path[0] ); … … 755 756 unset( $site_path[2] ); 756 757 757 if ( !count( $site_path ) ) 758 if ( !count( $site_path ) ) { 758 759 $site_path = '/'; 759 else760 } else { 760 761 $site_path = '/' . implode( '/', $site_path ) . '/'; 762 } 761 763 } 762 764 } … … 778 780 */ 779 781 function bp_core_current_time( $gmt = true, $type = 'mysql' ) { 780 // Get current time 781 $current_time = current_time( $type, $gmt ); 782 783 return apply_filters( 'bp_core_current_time', $current_time ); 782 return apply_filters( 'bp_core_current_time', current_time( $type, $gmt ) ); 784 783 } 785 784 … … 813 812 814 813 // Use this filter to bypass BuddyPress's time_since calculations 815 if ( $pre_value = apply_filters( 'bp_core_time_since_pre', false, $older_date, $newer_date ) ) { 814 $pre_value = apply_filters( 'bp_core_time_since_pre', false, $older_date, $newer_date ); 815 if ( false !== $pre_value ) { 816 816 return $pre_value; 817 817 }
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)