<commit_before><?php
/*
Plugin Name: Ninja Forms Editor Permissions
Plugin URI: http://rapidweb.biz
Description: Give Editors access to the Ninja Forms menu in their dashboard area.
Version: 1.0.0
Author: Rapid Web Ltd
Author URI: http://rapidweb.biz

Based on dmajwool work here: https://wordpress.org/support/topic/works-but-there-is-capabilities-problems However, packaged it up with shorter function names
*/
// To give Editors access to the ALL Forms menu
function ninja_forms_editor_permissions( $capabilities ) {
    $capabilities = "edit_pages";
    return $capabilities;
}
add_filter( 'ninja_forms_admin_parent_menu_capabilities', 'ninja_forms_editor_permissions' );
add_filter( 'ninja_forms_admin_all_forms_capabilities', 'ninja_forms_editor_permissions' );
// To give Editors access to ADD New Forms
function my_custom_change_ninja_forms_add_new_capabilities_filter( $capabilities ) {
    $capabilities = "edit_pages";
    return $capabilities;
}
add_filter( 'ninja_forms_admin_parent_menu_capabilities', 'my_custom_change_ninja_forms_add_new_capabilities_filter' );<commit_msg>Updated name in plugin comments.<commit_after><?php
/*
Plugin Name: Permissions Editor for Ninja Forms
Plugin URI: http://rapidweb.biz
Description: Give Editors access to the Ninja Forms menu in their dashboard area.
Version: 1.0.0
Author: Rapid Web Ltd
Author URI: http://rapidweb.biz

Based on dmajwool work here: https://wordpress.org/support/topic/works-but-there-is-capabilities-problems However, packaged it up with shorter function names
*/
// To give Editors access to the ALL Forms menu
function ninja_forms_editor_permissions( $capabilities ) {
    $capabilities = "edit_pages";
    return $capabilities;
}
add_filter( 'ninja_forms_admin_parent_menu_capabilities', 'ninja_forms_editor_permissions' );
add_filter( 'ninja_forms_admin_all_forms_capabilities', 'ninja_forms_editor_permissions' );
// To give Editors access to ADD New Forms
function my_custom_change_ninja_forms_add_new_capabilities_filter( $capabilities ) {
    $capabilities = "edit_pages";
    return $capabilities;
}
add_filter( 'ninja_forms_admin_parent_menu_capabilities', 'my_custom_change_ninja_forms_add_new_capabilities_filter' );
{'fraction_non_alphanumeric': 0.08405270331667423, 'fraction_numerical': 0.0027260336210813267, 'mean_word_length': 6.515358361774744, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6593832', 'n_tokens_mistral': 712, 'n_tokens_neox': 675, 'n_words': 177}