Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function profile_tab_terawallet() {
- global $bp;
- bp_core_new_nav_item( array(
- 'name' => 'woo wallet',
- 'slug' => 'wallet',
- 'screen_function' => 'wallet_screen',
- 'position' => 107, //you can make this a variable in your plugin
- 'parent_url' => bp_loggedin_user_domain() . '/wallet/',
- 'parent_slug' => $bp->profile->slug,
- 'default_subnav_slug' => 'wallet'
- ) );
- }
- add_action( 'bp_setup_nav', 'profile_tab_terawallet' );
- function wallet_screen() {
- // Add title and content here - last is to call the members plugin.php template.
- add_action( 'bp_template_title', 'wallet_title' );
- add_action( 'bp_template_content', 'wallet_content' );
- bp_core_load_template( 'buddypress/members/single/plugins' );
- }
- function wallet_title() {
- echo 'my virtual wallet';
- }
- function wallet_content() {
- echo do_shortcode( '[woo-wallet]' );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement