Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: bp-Events plugins directory question


nicolagreco
Participant

@nicolagreco

to add stuff under the buddyrpess menu in wp admin it’s not needed to keep your plugin in /plugins/buddypress :S

look here from the bpdev-admin.php code

add_menu_page(
'BPDEV Admin',
'BPDEV Admin',
2,
'bpdev-admin',
'bpdev_admin_settings_page',
BPDEV_PLUGINS_URL . '/bpdev-core/images/icon.png'
);

add_submenu_page(
'bpdev-admin',
'All Plugins',
'All Plugins',
1,
'bpdev-plugins',
'bpdev_admin_plugins'
);

so, the first create a new item, the second a new sub-item, you should create a subitem like that

add_submenu_page(
'buddypress', <== check this on the code
'My Plugin',
'My Plugin',
1,<= Position
'bpdev-plugins', <= Slug
'bpdev_admin_plugins' <= callback
);

put it in a function and add_action( '_admin_menu', 'my_function_with_my_menus' )

Skip to toolbar