#2355 closed enhancement (worksforme)
bp_core_new_nav_item doesn't allow for an array as a callback.
Reported by: | brandondove | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | bp_core_new_nav_item |
Cc: |
Description
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
It works if you use this kind of syntax: