Change the label / add a new class / redirect for login/register buttons
add_filter( 'wpj_header_button_filter', 'wpj_custom_login_register_buttons' );
function wpj_custom_login_register_buttons( $buttons_list ) {
global $site_url_localized;
// Changes to reflect on all pages
$buttons_list['login']['label'] = __( 'New name for login', 'wpjobster' );
$buttons_list['register']['label'] = __( 'New name for register', 'wpjobster' );
//
If some classes which contain some CSS need to be attached to the button
$buttons_list['login']['a_class'] = '';
//
if you want to redirect the user to other website or page
$buttons_list['login']['url'] = '';
// Only for register page
if ( $GLOBALS['pagenow'] === 'wp-login.php' && ! empty( $_REQUEST['action'] ) && $_REQUEST['action'] === 'register' ) {
$buttons_list['login']['label'] = __( 'New name for login', 'wpjobster' );
$buttons_list['register']['label'] = __( 'New name for register', 'wpjobster' );
}
// Only for login page
if ( $GLOBALS['pagenow'] === 'wp-login.php' && ( ! isset( $_REQUEST['action'] ) || $_REQUEST['action'] != 'register' ) ) {
$buttons_list['login']['label'] = __( 'New name for login', 'wpjobster' );
$buttons_list['register']['label'] = __( 'New name for register', 'wpjobster' );
}
// Both login and register pages
if ( $GLOBALS['pagenow'] === 'wp-login.php' ) {
$buttons_list['login']['label'] = __( 'New name for login', 'wpjobster' );
$buttons_list['register']['label'] = __( 'New name for register', 'wpjobster' );
}
return $buttons_list;
}