Changeset 4961 for trunk/bp-core/bp-core-template.php
- Timestamp:
- 08/10/2011 06:32:02 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r4907 r4961 495 495 function bp_action_variable( $position = 0 ) { 496 496 $action_variables = bp_action_variables(); 497 497 498 498 $action_variable = isset( $action_variables[$position] ) ? $action_variables[$position] : false; 499 499 500 500 return apply_filters( 'bp_action_variable', $action_variable, $position ); 501 501 } … … 669 669 } elseif ( isset( $bp->{$component}->slug ) && $bp->{$component}->slug == $bp->current_component ) { 670 670 $is_current_component = true; 671 671 672 672 // Next, check to see whether $component is a canonical, 673 673 // non-translatable component name. If so, we can return its … … 677 677 $is_current_component = true; 678 678 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 680 680 // created by $bp->pages, as well as the regular slugs 681 681 } else { … … 752 752 * the function will return true if the $action_variable is found *anywhere* in the action 753 753 * variables array. 754 * @return bool 754 * @return bool 755 755 */ 756 756 function bp_is_action_variable( $action_variable = '', $position = false ) { 757 757 $is_action_variable = false; 758 758 759 759 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 761 761 if ( $action_variable ) { 762 762 $is_action_variable = $action_variable == bp_action_variable( $position ); … … 770 770 $is_action_variable = in_array( $action_variable, (array)bp_action_variables() ); 771 771 } 772 772 773 773 return apply_filters( 'bp_is_action_variable', $is_action_variable, $action_variable, $position ); 774 774 } … … 829 829 function bp_is_root_component( $component_name ) { 830 830 global $bp; 831 831 832 832 if ( !isset( $bp->active_components ) ) 833 833 return false; … … 1030 1030 if ( bp_is_current_component( 'xprofile' ) && bp_is_current_action( 'edit' ) ) 1031 1031 return true; 1032 1032 1033 1033 return false; 1034 1034 }
Note: See TracChangeset
for help on using the changeset viewer.