[buddypress-trac] [BuddyPress] #2355: bp_core_new_nav_item doesn't allow for an array as a callback.

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Apr 28 09:12:38 UTC 2010


#2355: bp_core_new_nav_item doesn't allow for an array as a callback.
-------------------------+--------------------------------------------------
 Reporter:  brandondove  |       Owner:                      
     Type:  defect       |      Status:  new                 
 Priority:  normal       |   Milestone:  1.3                 
Component:  Core         |    Keywords:  bp_core_new_nav_item
-------------------------+--------------------------------------------------
 When you're including this functionality in a class definition, the
 callback function can't be found based on just a string function. Below is
 the syntax BP allows for if not within a class definition:
 {{{
 bp_core_new_nav_item( array(
         '...' => '...',
         'screen_function' => 'show_user_ideas',
         '...' => '...'
 ) );
 function show_user_ideas() { ... }
 }}}

 It seems like it should allow for the following:
 {{{
 class Foo {

         function Foo() {
                 bp_core_new_nav_item( array(
                         '...' => '...',
                         'screen_function' => array( 'show_user_ideas',
 &$this ),
                         '...' => '...'
                 ) );
         }

         function show_user_ideas() { ... }
 }
 }}}

 I'm using WordPress (3.0-beta1) and BuddyPress 1.3-bleeding.

-- 
Ticket URL: <https://trac.buddypress.org/ticket/2355>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list