Skip to content

Commit

Permalink
login as editor as an example for testing user roles
Browse files Browse the repository at this point in the history
  • Loading branch information
bacoords committed May 15, 2024
1 parent 30bf43d commit b3d1b65
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions blueprints/login-as-editor/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Login as an editor",
"description": "Test WordPress functionality as an editor rather than an administrator.",
"author": "bacoords",
"categories": ["User", "Role"]
},
"landingPage": "/wp-admin/",
"steps": [
{
"step": "runPHP",
"code": "<?php require '/wordpress/wp-load.php'; $user_id = wp_create_user('myuser', 'mypass', 'myuser@localhost'); (new WP_User($user_id))->set_role('editor');"
},
{
"step": "login",
"username": "myuser",
"password": "mypass"
}
]
}

0 comments on commit b3d1b65

Please sign in to comment.