Guest User

Untitled

a guest
Aug 23rd, 2020
62
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function dd_setup_user_custom_nav_1(){
  2.     global $bp;
  3.  
  4.     bp_core_new_nav_item( array(
  5.         'name' => 'Custom 1',
  6.         'slug' => 'custom-1',
  7.         'parent_url' => $bp->profile->slug,
  8.         'parent_slug' => $bp->profile->slug,
  9.         'screen_function' => 'bp_user_custom_1',
  10.         'position' => 10,
  11.         'user_has_access' => $user_access,
  12.         'item_css_id' => 'custom-1'
  13.     ));
  14.    
  15. }
  16. add_action( 'bp_setup_nav', 'dd_setup_user_custom_nav_1' );
  17.  
  18. function bp_user_custom_1() {
  19.  
  20.     add_action('bp_template_content', 'dd_bp_user_custom_1_show_screen_content');
  21.  
  22.     $templates = array('members/single/plugins.php', 'plugin-template.php');
  23.     if (strstr(locate_template($templates), 'members/single/plugins.php')) {
  24.         bp_core_load_template(apply_filters('bp_core_template_plugin', 'members/single/plugins'));
  25.     } else {
  26.         bp_core_load_template(apply_filters('bp_core_template_plugin', 'plugin-template'));
  27.     }
  28.  
  29. }
  30.  
  31.  
  32. function dd_bp_user_custom_1_show_screen_content() { ?>
  33.  
  34. <div>
  35.  
  36. USER CONTENT
  37.  
  38. </div>
  39.  
  40.  
  41. <?php
  42.  
  43. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×