Guest User

Untitled

a guest
Mar 5th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.20 KB | None | 0 0
  1. <?php
  2.  
  3. function profile_subnav_tab() {
  4.     global $bp;
  5.     bp_core_new_subnav_item( array(
  6.         'name' => __( 'Competencias' ),
  7.         'slug' => 'competencias',
  8.         'parent_url' => trailingslashit( bp_loggedin_user_domain() . 'profile' ),
  9.         'parent_slug' => 'profile',
  10.         'screen_function' => 'profile_subnav_tab_screen',
  11.         'position' => 0
  12.     ));
  13. }
  14. add_action( 'bp_setup_nav', 'profile_subnav_tab', 100 );
  15.  
  16. function profile_subnav_tab_screen() {
  17.     add_action( 'bp_template_title', 'profile_subnav_tab_screen_title' );
  18.     add_action( 'bp_template_content', 'profile_subnav_tab_screen_content' );
  19.     bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
  20. }
  21.  
  22. function profile_subnav_tab_screen_title() {
  23.     echo '<div class="hr-title hr-full hr-double"><abbr>Competencias</abbr></div><div class="gap-10"></div>';
  24. }
  25.  
  26. function profile_subnav_tab_screen_content() {
  27.     echo '<p>content</p>';
  28. }
  29.  
  30. function profile_subnav_default() {
  31.     $args = array(
  32.         'parent_slug' => 'profile',
  33.         'screen_function' => 'profile_subnav_tab_screen',
  34.         'subnav_slug' => 'competencias'
  35.     );
  36.     bp_core_new_nav_default($args);
  37. }
  38. add_action('bp_setup_nav', 'profile_subnav_default', 5);
Advertisement
Add Comment
Please, Sign In to add comment