Created
April 13, 2020 09:28
-
-
Save code-flow/9390806edb2e4e0c01934bc0c62be3e5 to your computer and use it in GitHub Desktop.
Permissions for editors in SNIP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: snip Permissions | |
Description: Sets permissions to use SNIPs REST API the way you like it. | |
Version: 0.1.0 | |
*/ | |
add_filter( | |
'wpbuddy/rich_snippets/rest/permission', | |
function () { | |
# change this to any capability you want: https://wordpress.org/support/article/roles-and-capabilities/ | |
return current_user_can('edit_posts'); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment