Skip to content

Commit

Permalink
Blueprint to write an admin notice (#8)
Browse files Browse the repository at this point in the history
A tiny blueprint to write a file, place it into the mu-plugins folder
and say hello.

_props for the example to @ironnysh_
  • Loading branch information
bph authored Apr 11, 2024
1 parent 750101a commit 07c3eb1
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions blueprints/admin-notice/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Display Admin Notice ",
"description": "Blueprint to add a tiny mu-plugin and display an admin notice",
"author": "bph",
"categories": ["Admin", "notices"]
},
"landingPage": "/wp-admin/plugins.php",
"steps":[
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "writeFile",
"path": "/wordpress/wp-content/mu-plugins/bgnightly-notice.php",
"data": "<?php add_action('admin_notices', function() { echo '<div class=\"notice notice-info is-dismissible\"><p>Hello from Playground.</p></div>'; });"
}
]
}

0 comments on commit 07c3eb1

Please sign in to comment.