Skip to content

Commit 5932f8b

Browse files
authored
Merge pull request #11 from marijoo/master
Add Netlify status badge and deploy button the admin bar – also allow editors to deploy #10 Remove un-needed params for add_submenu_page #8
2 parents 35a337d + 7651b5f commit 5932f8b

File tree

2 files changed

+220
-59
lines changed

2 files changed

+220
-59
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ From your WordPress dashboard
1919
1. **Visit** Plugins > Add New
2020
2. **Search** for "Deploy Webhook Button"
2121
3. **Install** plugin
22-
4. **Activate** the plugin
22+
4. **Activate** the plugin
2323
5. **Click** on the new menu item "Deploy Netlify Webhook" and enter your site details/keys
2424
6. **Enter** enter your site_id, webhook POST address, Netlify API Key, and User-Agent
2525
7. **Read** the documentation to [get started](https://github.com/lukethacoder/wp-netlify-webhook-deploy)
@@ -56,6 +56,26 @@ From your WordPress dashboard
5656

5757
[![Netlify Site Info](https://github.com/lukethacoder/wp-netlify-webhook-deploy/blob/master/assets/screenshot-3.png)](https://github.com/lukethacoder/wp-netlify-webhook-deploy)
5858

59+
---
60+
61+
## Admin Bar
62+
63+
A deploy button and the status badge of the last build is added to the admin bar. By default this will only be displayed to users that can `manage_options`.
64+
65+
You may allow other user roles with these two filters:
66+
67+
```
68+
add_filter('netlify_status_capability', function() {
69+
return 'edit_pages';
70+
});
71+
72+
add_filter('netlify_deploy_capability', function() {
73+
return 'edit_pages';
74+
});
75+
```
76+
77+
78+
5979
---
6080

6181
## Screenshots

0 commit comments

Comments
 (0)