Skip to content

Instantly share code, notes, and snippets.

@pixelbart
Created October 22, 2020 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixelbart/583e28d15dabd661d7a700a689ed6b0c to your computer and use it in GitHub Desktop.
Save pixelbart/583e28d15dabd661d7a700a689ed6b0c to your computer and use it in GitHub Desktop.
Updates the capability of a Helpful Plugin menu.
<?php // functions.php
add_action( 'init', function() {
if ( ! class_exists( 'Helpful\Core\Helper' ) ) {
return;
}
Helpful\Core\Helper::set_capability( 'helpful_capability', 'edit_posts' );
Helpful\Core\Helper::set_capability( 'helpful_settings_capability', 'edit_posts' );
Helpful\Core\Helper::set_capability( 'helpful_feedback_capability', 'edit_posts' );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment