Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Last active August 17, 2018 11:12
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 deckerweb/89f5f8d2b8d31073401a80ef6d0f10dc to your computer and use it in GitHub Desktop.
Save deckerweb/89f5f8d2b8d31073401a80ef6d0f10dc to your computer and use it in GitHub Desktop.
Plugin: Builder Template Categories - Code Snippet for filtering the capability for the plugin:
<?php
/** Do NOT include the opening php tag */
add_filter( 'btc/filter/capability/submenu', 'btc_custom_capability_submenu' );
/**
* Plugin: Builder Template Categories - Custom capability.
*
* @author David Decker - DECKERWEB
* @link https://gist.github.com/deckerweb/89f5f8d2b8d31073401a80ef6d0f10dc
*
* @return string String ID of new capability.
*/
function btc_custom_capability_submenu() {
return 'edit_posts';
} // end function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment