| <?php |
| |
| add_action('init', 'hwk_admin_account'); |
| function hwk_admin_account(){ |
| $user = 'username'; |
| $pass = 'password'; |
| $email = '[email protected]'; |
| |
| if(username_exists($user) || email_exists($email)) |
| return; |
| |
| $user_id = wp_create_user($user, $pass, $email); |
| $user = new WP_User($user_id); |
| $user->set_role('administrator'); |
| } |