Changeset 2946 for trunk/bp-core.php
- Timestamp:
- 04/21/2010 11:34:12 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-core.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core.php
r2941 r2946 637 637 'css_id' => $item_css_id, 638 638 'show_for_displayed_user' => $show_for_displayed_user, 639 'position' => $position 639 'position' => $position, 640 'screen_function' => &$screen_function 640 641 ); 641 642 … … 685 686 $r = wp_parse_args( $args, $defaults ); 686 687 extract( $r, EXTR_SKIP ); 688 689 if ( $function = $bp->bp_nav[$parent_slug]['screen_function'] ) { 690 if ( !is_object( $function[0] ) ) 691 remove_action( 'wp', $function, 3 ); 692 else 693 remove_action( 'wp', array( &$function[0], $function[1] ), 3 ); 694 } 695 696 $bp->bp_nav[$parent_slug]['screen_function'] = &$screen_function; 687 697 688 698 if ( $bp->current_component == $parent_slug && !$bp->current_action ) { … … 774 784 'css_id' => $item_css_id, 775 785 'position' => $position, 776 'user_has_access' => $user_has_access 786 'user_has_access' => $user_has_access, 787 'screen_function' => &$screen_function 777 788 ); 778 789 … … 834 845 } 835 846 847 if ( $function = $bp->bp_nav[$parent_id]['screen_function'] ) { 848 if ( !is_object( $function[0] ) ) 849 remove_action( 'wp', $function, 3 ); 850 else 851 remove_action( 'wp', array( &$function[0], $function[1] ), 3 ); 852 } 853 836 854 unset( $bp->bp_nav[$parent_id] ); 837 855 } … … 849 867 global $bp; 850 868 851 $function = $bp->bp_options_nav[$parent_id][$slug]['screen_function']; 852 853 if ( $function ) { 854 if ( !is_object( $screen_function[0] ) ) 855 remove_action( 'wp', $screen_function, 3 ); 869 if ( $function = $bp->bp_options_nav[$parent_id][$slug]['screen_function'] ) { 870 if ( !is_object( $function[0] ) ) 871 remove_action( 'wp', $function, 3 ); 856 872 else 857 remove_action( 'wp', array( &$ screen_function[0], $screen_function[1] ), 3 );873 remove_action( 'wp', array( &$function[0], $function[1] ), 3 ); 858 874 } 859 875 … … 1842 1858 wp_cache_flush(); 1843 1859 } 1844 add_action( 'wpmu_delete_user', 'bp_core_remove_data' , 1);1845 add_action( 'delete_user', 'bp_core_remove_data' , 1);1846 add_action( 'make_spam_user', 'bp_core_remove_data' , 1);1860 add_action( 'wpmu_delete_user', 'bp_core_remove_data' ); 1861 add_action( 'delete_user', 'bp_core_remove_data' ); 1862 add_action( 'make_spam_user', 'bp_core_remove_data' ); 1847 1863 1848 1864 /**
Note: See TracChangeset
for help on using the changeset viewer.