Jump to content

Problem customizing a wordpress plugin


music

Recommended Posts

I'm trying to customize the "sidebar-login" plugin for wordpress. I'm not really good with PHP.

 

This is the code I'm trying to customize:

 

*/

function sidebarlogin() {

    $args["before_widget"]="";

    $args["after_widget"]="";

    $args["before_title"]="<h2>";

    $args["after_title"]="</h2>";

    widget_sidebarlogin($args);

}

function widget_sidebarlogin($args) {

 

        extract($args);

     

        global $user_ID;

 

        if (isset($user_ID)) {

            // User is logged in

            $user_info = get_userdata($user_ID);

            echo $before_widget . $before_title . __("Bienvenue "). $user_info->display_name . $after_title;

            echo '<ul class="pagenav">

                    <li class="page_item"><a href="'.get_bloginfo('wpurl').'/wp-admin/">'.__('Tableau de bord').'</a></li>

                    <li class="page_item"><a href="'.get_bloginfo('wpurl').'/wp-admin/profile.php">'.__('Profil').'</a></li>

                    <li class="page_item"><a href="'.current_url('logout').'">'.__('Se déconnecter').'</a></li>

                    <li class="page_item"><a href="'.get_bloginfo('wpurl').'/clients/??????">'.__('Votre page').'</a></li>

 

            </ul>';

 

 

I would like to know what to put and how to write it at the place of the ?????? so it will be the login name (not the name of the user but the username).

 

So to be clear what I want is something like this -> If the user login with the username "member1" I want something like .get_bloginfo('wpurl').'/clients/membre1    -> member1 should in fact be a variable.

 

 

I think the answer could be in the rest of the code so you can look at the php file

 

 

Thanks a lot!

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.