I create a custom plugin that can also access the editor role,
why it doesn't take any effect, is there something wrong in my code?

public function __construct()
    register_activation_hook( __FILE__, 'activate_plugin_name' );

public function activate_plugin_name() {
    $role = get_role( 'editor' );
    $role->add_cap( 'manage_options' ); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.