WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change the word "Register" in the admin bar (5 posts)

  1. Prometheus Fire
    Member
    Posted 1 year ago #

    Trying to get a function that will parse the Register link in the admin bar to change the text. I've got it deployed on multisite and I want to clarify how it reads.

    I want it to say something like "Register a new [insert network name] account"

    Can anyone help?

  2. Good Guy
    Member
    Posted 1 year ago #

    It is in a file called "wp-includes/general-template.php".

    You are expert in php right? Have a go and if it ain't broken, break it!!

    Not sure how do you go about using the child theme; perhaps you can tell us here for a record!!

  3. Prometheus Fire
    Member
    Posted 1 year ago #

    Not a php expert but I gave it a shot and it didn't work. I'm deploying the function as part of a mu-plugin (but that doesn't really matter, it'll work in functions.php too for a theme, or as a plugin by itself too - where it goes doesn't really matter.)

    Anyhow, this is what I have so far and it doesn't work:

    // Change the default register link to something branded
    function branded_register_link() {
    	echo '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register a new network account') . '</a>';
    }
    add_action( 'wp_register', 'branded_register_link',);
  4. Prometheus Fire
    Member
    Posted 1 year ago #

    The function from wp-includes/general-template.php is not what I need to be modifying. Just as a test I changed the text in the original function in the core file and it had no impact on the wpadminbar link. I find out where the admin bar link is created and modify that function. That's why I wasn't getting anything response from my code.

    Still need help with this - where does the admin bar get its Register element?

  5. Prometheus Fire
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic