WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Admin Bar Improved
Change Register hyperlink to a button (2 posts)

  1. tuoncan
    Member
    Posted 1 year ago #

    Hi
    I love the plugin but I'm having a hard time changing the register hyperlink to a button.

    I looked at the after_admin_bar_render function in wpabi.php file and made the following changes but it didn't seem to work.

    $loginform .= '<div class="loginform">
    <form action="'.wp_login_url().'" method="post" id="adminbarlogin">
    <input class="adminbar-input" name="log" id="adminbarlogin-log" type="text" value="'.__('Username', $this->textdomain).'" />
    <input class="adminbar-input" name="pwd" id="adminbarlogin-pwd" type="password" value="'.__('Password', $this->textdomain).'" />
    <input type="submit" class="adminbar-button" value="'.__('Login').'"/>';
    if($this->options['reg_link'])
    {
       //$loginform .= '<button class="adminbar-button">'.__('Register', $this->textdomain).'</button>';
       $loginform .= '<button class="adminbar-button"><a href="'.wp_login_url().'?action=register">'.__('Register', $this->textdomain).'</a></button>';
    }
    $loginform .= '</form></div>';

    http://wordpress.org/extend/plugins/wordpress-admin-bar-improved/

  2. sethuraman
    Member
    Posted 1 year ago #

    It can be done by using onclick event and trigger the redirection

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.