[buddypress-trac] [BuddyPress] #4837: using bp_core_new_nav_item and plugins.php borked

buddypress-trac noreply at wordpress.org
Tue Feb 19 23:52:05 UTC 2013


#4837: using bp_core_new_nav_item and plugins.php borked
--------------------------+------------------
 Reporter:  modemlooper   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  highest       |   Milestone:  1.7
Component:  Core          |     Version:  1.7
 Severity:  blocker       |  Resolution:
 Keywords:                |
--------------------------+------------------

Comment (by modemlooper):

 Somebody posted it in the forum and I tested and sure enough it was
 showing the members list.

 code:


 {{{
 function bp_setup_sub_nav() {
         global $bp;

                 // Add a nav item for this
         bp_core_new_nav_item( array(
                 'name' => __( 'SubNav', 'bp-subnavy' ),
                 'slug' => 'subnav',
                 'screen_function' => 'bp_subnav_screen_settings_menu',
                 'position' => 40,
                 'user_has_access' => bp_is_my_profile()
         ) );

 }
 add_action( 'bp_setup_nav', 'bp_setup_sub_nav' );



 function bp_subnav_screen_settings_menu() {

         add_action( 'bp_template_content',
 'bp_subnav_screen_settings_content' );
         bp_core_load_template( apply_filters( 'bp_core_template_plugin',
 'members/single/plugins' ) );

 }


 function bp_subnav_screen_settings_content() {

         echo 'Why Roger, why?';

 }
 }}}

 Yesterdays trunk, I'll update now and retest.

 Twenty Twelve

 [http://dev.taptappress.com/admin/subnav/]

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4837#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list