I’m not 100% sure, but it seems that the registration link is generated on general-template.php
in wp-includes
. Look at the function wp_register
. Here you have a filter called register
which you can use to filter the wp-login.php
out.
/**
* Display the Registration or Admin link.
*
* Display a link which allows the user to navigate to the registration page if
* not logged in and registration is enabled or to the dashboard if logged in.
*
* @since 1.5.0
* @uses apply_filters() Calls 'register' hook on register / admin link content.
*
* @param string $before Text to output before the link (defaults to <li>).
* @param string $after Text to output after the link (defaults to </li>).
* @param boolean $echo Default to echo and not return the link.
*/
function wp_register( $before="<li>", $after="</li>", $echo = true ) {
if ( ! is_user_logged_in() ) {
if ( get_option('users_can_register') )
$link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after;
else
$link = '';
} else {
$link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
}
if ( $echo )
echo apply_filters('register', $link);
else
return apply_filters('register', $link);
}
EDIT
add_filter('register', 'wpse28495_wpRegister');
function wpse28495_wpRegister($link) {
if(!is_user_logged_in()) {
$link = '<a href="' . site_url('my-login.php') . '">' . __('Register') . '</a>';
}
return $link;
}