Skip to:
Content

BuddyPress.org

Ticket #3465: 3465.001.diff

File 3465.001.diff, 2.8 KB (added by cnorris23, 13 years ago)

also cleans some whitespace

  • bp-core/bp-core-template.php

     
    494494 */
    495495function bp_action_variable( $position = 0 ) {
    496496        $action_variables = bp_action_variables();
    497        
     497
    498498        $action_variable = isset( $action_variables[$position] ) ? $action_variables[$position] : false;
    499        
     499
    500500        return apply_filters( 'bp_action_variable', $action_variable, $position );
    501501}
    502502
     
    668668                // Because slugs can differ from root_slugs, we should check them too
    669669                } elseif ( isset( $bp->{$component}->slug ) && $bp->{$component}->slug == $bp->current_component ) {
    670670                        $is_current_component = true;
    671                        
     671
    672672                // Next, check to see whether $component is a canonical,
    673673                // non-translatable component name. If so, we can return its
    674674                // corresponding slug from $bp->active_components.
     
    676676                        if ( strstr( $bp->current_component, $key ) )
    677677                                $is_current_component = true;
    678678
    679                 // If we haven't found a match yet, check against the root_slugs 
     679                // If we haven't found a match yet, check against the root_slugs
    680680                // created by $bp->pages, as well as the regular slugs
    681681                } else {
    682682                        foreach ( $bp->active_components as $key => $id ) {
     
    751751 * @param int $position The array key you're testing against. If you don't provide a $position,
    752752 *   the function will return true if the $action_variable is found *anywhere* in the action
    753753 *   variables array.
    754  * @return bool 
     754 * @return bool
    755755 */
    756756function bp_is_action_variable( $action_variable = '', $position = false ) {
    757757        $is_action_variable = false;
    758        
     758
    759759        if ( false !== $position ) {
    760                 // When a $position is specified, check that slot in the action_variables array         
     760                // When a $position is specified, check that slot in the action_variables array
    761761                if ( $action_variable ) {
    762762                        $is_action_variable = $action_variable == bp_action_variable( $position );
    763763                } else {
     
    769769                // When no $position is specified, check the entire array
    770770                $is_action_variable = in_array( $action_variable, (array)bp_action_variables() );
    771771        }
    772        
     772
    773773        return apply_filters( 'bp_is_action_variable', $is_action_variable, $action_variable, $position );
    774774}
    775775
     
    828828 */
    829829function bp_is_root_component( $component_name ) {
    830830        global $bp;
    831        
     831
    832832        if ( !isset( $bp->active_components ) )
    833833                return false;
    834834
     
    10291029
    10301030        if ( bp_is_current_component( 'xprofile' ) && bp_is_current_action( 'edit' ) )
    10311031                return true;
    1032                
     1032
    10331033        return false;
    10341034}
    10351035
     
    12891289/** Registration **************************************************************/
    12901290
    12911291function bp_is_activation_page() {
    1292         if ( bp_is_current_component( 'activation' ) )
     1292        if ( bp_is_current_component( 'activate' ) )
    12931293                return true;
    12941294
    12951295        return false;