Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Profile information disappeared #15060
     iulianolaru
    Participant

    Hey, i can’t seem to get this working. I will paste my full sweetdate-child/functions.php so you can see maybe there’s something wrong in it.

    The name of the tabs are the names of the actual profile field groups.

    Thank you in advance

    COPY CODE
    /* my changes to profile tabs */ 
    add_action('after_setup_theme','kleo_my_custom_tabs');
    function kleo_my_custom_tabs() 
    {
    	global $bp_tabs;
    	$bp_tabs = array();
    	$bp_tabs['Op zoek naar'] = array(
    			'type' => 'regular',
    			'name' =>  __('Op zoek naar', 'kleo_framework'),
    			'group' => 'Op zoek naar',
    			'class' => 'regulartab'
    	);
    
    	$bp_tabs['Basis informatie'] = array(
    			'type' => 'regular',
    			'name' => __('Basis informatie', 'kleo_framework'),
    			'group' => 'Basis informatie',
    			'class' => 'regulartab'
    	);
    	
    	$bp_tabs['Physical'] = array(
    			'type' => 'regular',
    			'name' => __('Physical', 'kleo_framework'),
    			'group' => 'Physical', 
    			'class' => 'regulartab'
    	);
    
    /* rtMedia tab - only if plugin installed */
    	if (class_exists('RTMedia')) 
    	{
    		$bp_tabs['rtmedia'] = array(
    				'type' => 'rt_media',
    				'name' => __('Fotos', 'kleo_framework'),
    				'class' => 'mySlider'
    		);
    	}
    }
    function kleo_membership_info_guest()
    {
      global $membership_levels,$current_user;
      if (! $membership_levels) {
        return;
      }
      
      if (!bp_is_my_profile())
      {
          $membership = pmpro_getMembershipLevelForUser(bp_displayed_user_id());
        if ($membership)
        {
            
          echo '<span class="label radius pmpro_label">'.$membership->name.'</span>';
        }
        else
        {
          echo '<span class="label radius pmpro_label">'.__("No membership",'kleo_framework').'</span>';
        }
      }
    }
    add_action('kleo_bp_after_profile_name', 'kleo_membership_info_guest');
    
    /* Filter the redirect url for login*/
    add_filter("login_redirect","kleo_redirect_to_profile",100,3);
     
    function kleo_redirect_to_profile($redirect_to_calculated,$redirect_url_specified,$user){
    /*if no redirect was specified,let us think ,user wants to be in wp-dashboard*/
        if(!is_super_admin($user->ID))
            return bp_core_get_user_domain($user->ID );
        else
            return $redirect_to_calculated; /*if site admin*/
    }
    ?>
Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?