Guest User

bp-custom

a guest
Mar 5th, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.92 KB | None | 0 0
  1. <?php
  2.  
  3. function profile_subnav_tab_screen() {
  4.     add_action( 'bp_template_title', 'profile_subnav_tab_screen_title' );
  5.     add_action( 'bp_template_content', 'profile_subnav_tab_screen_content' );
  6.     bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );
  7. }
  8.  
  9. function profile_subnav_tab_screen_title() {
  10.     echo '<div class="hr-title hr-full hr-double"><abbr>Competencias</abbr></div><div class="gap-10"></div>';
  11. }
  12.  
  13. function profile_subnav_tab_screen_content() {
  14. ?>
  15.     <div class="kleo-tabs tabbable" data-interval="0">
  16.             <ul class="nav nav-pills responsive-pills pills-style-square tabs-centered">
  17.                 <li class="dropdown pull-right tabdrop hide"><a class="dropdown-toggle" data-toggle="dropdown" href="#">&nbsp;</a>
  18.                     <ul class="dropdown-menu"></ul>
  19.                 </li>
  20.                 <li class=""><a href="#myProfile" data-toggle="tab" onclick="return false;">Mi Perfil</a></li>
  21.                 <li class="active"><a href="#standardJob" data-toggle="tab" onclick="return false;">Puesto estándar</a></li>
  22.                 <li><a href="#standardPerson" data-toggle="tab" onclick="return false;">Persona estándar</a></li>
  23.             </ul>
  24.             <div class="tab-content">
  25.                 <div id="myProfile" class="tab-pane">
  26.                     <div class="kleo-gap" style="height:50px;line-height:50px;"></div>
  27.                     <div class="hr-title hr-long hr-center" style="">
  28.                         <abbr>Some info about Branding</abbr>
  29.                     </div>
  30.                     <div class="kleo-gap" style="height:20px;line-height:20px;"></div>
  31.                 </div>
  32.                 <div id="standardJob" class="tab-pane active">
  33.                     <div class="kleo-gap" style="height:50px;line-height:50px;"></div>
  34.                     <div class="hr-title hr-long hr-center" style="">
  35.                         <abbr>Standard Job</abbr>
  36.                     </div>
  37.                     <div class="kleo-gap" style="height:20px;line-height:20px;"></div>
  38.                     <div class="wpb_single_image wpb_content_element animated animate-when-visible bottom-to-top element-center text-center start-animation">
  39.                         <div class="wpb_wrapper">
  40.                             <img width="1500" height="1000" src="http://seventhqueen.com/themes/kleo/wp-content/uploads/2014/02/Responsive-Screen-Mockup-Pack.png" class="attachment-full" alt="Responsive-Screen-Mockup-Pack">
  41.                         </div>
  42.                     </div>
  43.                 </div>
  44.                 <div id="standardPerson" class="tab-pane">
  45.                     <div class="kleo-gap" style="height:50px;line-height:50px;"></div>
  46.                     <div class="hr-title hr-long hr-center" style="">
  47.                         <abbr>standardPerson</abbr>
  48.                     </div>
  49.                     <div class="kleo-gap" style="height:20px;line-height:20px;"></div>
  50.  
  51.                 </div> </div>
  52.             </div>
  53. <?php
  54.  
  55. }
  56.  
  57. function my_setup_nav() {
  58.     bp_core_new_nav_item( array(
  59.         'name' => __( 'Puestos', 'Puesto2' ),
  60.         'slug' => 'puestos',
  61.         'position' => 40,
  62.  
  63.     ) );
  64.  }
  65.  
  66. add_action( 'bp_setup_nav', 'my_setup_nav' );
  67.  
  68. function bbg_change_profile_tab() {
  69.     global $bp;
  70.  
  71.    
  72.     $bp->bp_nav['activity']['position'] = 10;
  73.     $bp->bp_nav['profile']['position'] = 20;
  74.     $bp->bp_nav['friends']['position'] = 30;
  75.     $bp->bp_nav['notifications']['position'] = 50;
  76.     $bp->bp_nav['messages']['position'] = 60;
  77.     $bp->bp_nav['groups']['position'] = 70;
  78.     $bp->bp_nav['settings']['position'] = 80;
  79.  
  80.     $bp->bp_nav['activity']['default_subnav_slug'] = 'competencias';
  81.     unset($bp->bp_nav['forums']);
  82.     unset($bp->bp_nav['media']);
  83.  
  84.     $bp->bp_nav['activity']['name'] = Actividad;
  85.     $bp->bp_nav['profile']['name'] = Perfil;
  86.     $bp->bp_nav['friends']['name'] = Contactos;
  87.     $bp->bp_nav['notifications']['name'] = Notificaciones;
  88.     $bp->bp_nav['messages']['name'] = Mensajes;
  89.     $bp->bp_nav['groups']['name'] = Grupos;
  90.     $bp->bp_nav['settings']['name'] = Ajustes;
  91. }
  92. add_action('bp_setup_nav', 'bbg_change_profile_tab', 999 );
  93.  
  94. function profile_subnav_tab() {
  95.     global $bp;
  96.     bp_core_new_subnav_item( array(
  97.         'name' => __( 'Competencias' ),
  98.         'slug' => 'competencias',
  99.         'parent_url' => trailingslashit( bp_loggedin_user_domain() . 'profile' ),
  100.         'parent_slug' => 'profile',
  101.         'screen_function' => 'profile_subnav_tab_screen',
  102.         'position' => 0
  103.     ));
  104. }
  105. add_action( 'bp_setup_nav', 'profile_subnav_tab', 100 );
  106.  
  107.  
  108. function change_profile_subnav()
  109. {
  110.     global $bp;
  111.  
  112.     $bp->bp_options_nav['profile']['change-avatar']['name'] = 'Foto';
  113.     $bp->bp_options_nav['profile']['public']['name'] = 'Datos';
  114.     $bp->bp_options_nav['profile']['edit']['name'] = 'Editar';
  115.    
  116. }
  117. add_action( 'wp_head', 'change_profile_subnav',9 );
  118.  
  119. function change_activity_subnav()
  120. {
  121.     global $bp;
  122.  
  123.     $bp->bp_options_nav['activity']['groups']['name'] = 'Grupos';
  124.     $bp->bp_options_nav['activity']['mentions']['name'] = 'Menciones';
  125.     $bp->bp_options_nav['activity']['favorites']['name'] = 'Favoritos';
  126.     $bp->bp_options_nav['activity']['friends']['name'] = 'Contactos';
  127.  
  128.     $bp->bp_options_nav['activity']['friends']['position'] = 10;
  129.     $bp->bp_options_nav['activity']['groups']['position'] = 20;
  130.     $bp->bp_options_nav['activity']['mentions']['position'] = 30;
  131.     $bp->bp_options_nav['activity']['favorites']['position'] = 40;
  132.     $bp->bp_options_nav['activity']['just-me']['position'] = 50;
  133.  
  134. }
  135. add_action( 'wp_head', 'change_activity_subnav',9 );
  136.  
  137. function profile_subnav_default() {
  138.     $args = array(
  139.         'parent_slug' => 'profile',
  140.         'screen_function' => 'profile_subnav_tab_screen',
  141.         'subnav_slug' => 'competencias'
  142.     );
  143.     bp_core_new_nav_default($args);
  144. }
  145. add_action('bp_setup_nav', 'profile_subnav_default', 5);
  146. ?>
Advertisement
Add Comment
Please, Sign In to add comment