📜  wp_create_user - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:48.546000             🧑  作者: Mango

代码示例1
function wp_create_user( $username, $password, $email = '' ) {
    $user_login = wp_slash( $username );
    $user_email = wp_slash( $email );
    $user_pass  = $password;
 
    $userdata = compact( 'user_login', 'user_email', 'user_pass' );
    return wp_insert_user( $userdata );
}