Forum Replies Created

Viewing 1 replies (of 1 total)
  • I solved it in my theme function like this:

    
        // set editor role for contact-form-cfdb-7 plugin
        include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
        if ( is_plugin_active( 'contact-form-cfdb7/contact-form-cfdb-7.php' ) ) {
            // Add custom capability
            $role = get_role( 'editor' );
            if(!$role->has_cap('cfdb7_access')){
                $role->add_cap( 'cfdb7_access' );
            }
        }
    

    It works, but I am not sure if that is a good solution.

Viewing 1 replies (of 1 total)