Skip to content

Commit 73fcccf

Browse files
committed
add blueprint
1 parent 80ec65a commit 73fcccf

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"landingPage": "/wp-admin/options-general.php?page=activitypub",
3+
"steps": [
4+
{
5+
"step": "setSiteOptions",
6+
"options": {
7+
"permalink_structure": "/%postname%/"
8+
}
9+
},
10+
{
11+
"step": "installPlugin",
12+
"pluginZipFile": {
13+
"resource": "wordpress.org/plugins",
14+
"slug": "activitypub"
15+
},
16+
"options": {
17+
"activate": true
18+
}
19+
},
20+
{
21+
"step": "login",
22+
"username": "admin",
23+
"password": "password"
24+
},
25+
{
26+
"step": "mkdir",
27+
"path": "wordpress/wp-content/mu-plugins"
28+
},
29+
{
30+
"step": "writeFile",
31+
"path": "wordpress/wp-content/mu-plugins/show-admin-notice-2.php",
32+
"data": "<?php\nadd_action(\n'admin_notices',\nfunction() {\n$dismissed = get_user_option( 'dismissed_expose_blueprint_notice-2', get_current_user_id() );\nif ( $dismissed ) {\nreturn;\n}\necho '<div class=\"notice notice-info is-dismissible\" id=\"custom-admin-notice-2\"><p>' . esc_html( 'Welcome and have fun 👋' ) . '</p></div>';\n}\n);\nadd_action('wp_ajax_dismiss_custom-admin-notice-2', function() {\ncheck_ajax_referer('custom-admin-notice-2', 'nonce');\n$user_id = get_current_user_id();\nif ( $user_id ) {\nupdate_user_option($user_id, 'dismissed_expose_blueprint_notice-2', 1, false);\nwp_send_json_success();\n} else {\nwp_send_json_error('User not found');\n}\n} );\nadd_action('admin_footer', function() {\n?>\n<script type=\"text/javascript\">\njQuery(document).ready( function($) {\nvar ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>';\nvar nonce = '<?php echo esc_html( wp_create_nonce( 'custom-admin-notice-2' ) ); ?>';\n$( '#custom-admin-notice-2' ).on( 'click', '.notice-dismiss', function() {\n$.ajax({\nurl: ajaxurl,\ntype: 'POST',\ndata: {\naction: 'dismiss_custom-admin-notice-2',\nnonce: nonce\n}\n});\n});\n});\n</script>\n<?php\n} );"
33+
},
34+
{
35+
"step": "setSiteOptions",
36+
"options": {
37+
"blogname": "ActivityPub Demo",
38+
"blogdescription": "Democratize Publishing in the Fediverse",
39+
"activitypub_enable_blog_user": "1"
40+
}
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)