mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed updating display_name if there is set the User Display Name setting to Default WP Display Name in UM > General > Users > Display name;
- fixed typo in the password validation
This commit is contained in:
@@ -391,5 +391,20 @@ if ( ! class_exists( 'UM_Functions' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replace the first match in the string, alternative for the `str_replace()` function
|
||||
*
|
||||
* @param string $search
|
||||
* @param string $replace
|
||||
* @param string $subject
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function str_replace_first( $search, $replace, $subject ) {
|
||||
$search = '/' . preg_quote( $search, '/' ) . '/';
|
||||
return preg_replace( $search, $replace, $subject, 1 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user