Created
March 8, 2018 21:22
-
-
Save iamchetanp/a2653fb12be95167163280eb217bbb29 to your computer and use it in GitHub Desktop.
Remove capability of moderate comments for editor.
This file contains hidden or 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
/** | |
* Remove capability of moderate comments for editor. | |
*/ | |
function cp_remove_aprove_comment_capability_for_editor() { | |
// Get the role object. | |
$editor = get_role( 'editor' ); | |
// Removes capabiity to moderate comments. | |
$editor->remove_cap( 'moderate_comments' ); | |
} | |
add_action( 'init', 'cp_remove_aprove_comment_capability_for_editor' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment