}
function Gaslightify_menu() {
add_menu_page('Server Stats', 'Server Stats', 'edit_posts', 'glm_stats', 'glm_stats', 'dashicons-chart-area');
+ add_menu_page('Form Submissions', 'Form Submissions', 'edit_posts', 'edit.php?post_type=nf_sub', '', 'dashicons-feedback');
}
add_action('admin_menu', 'Gaslightify_menu');
-
+/* To give Editors access to the Submissions - Simply replace ‘edit_posts’ in the code snippet below with the capability
+that you would like to attach the ability to view/edit submissions to.Please note that all three filters are needed to
+provide proper submission viewing/editing on the backend!
+*/
+function nf_subs_capabilities( $cap ) {
+ return 'edit_posts';
+}
+add_filter( 'ninja_forms_admin_submissions_capabilities', 'nf_subs_capabilities' );
+add_filter( 'ninja_forms_admin_parent_menu_capabilities', 'nf_subs_capabilities' );
+//add_filter( 'ninja_forms_admin_menu_capabilities', 'nf_subs_capabilities' );
?>
#metaslider_social,
.ngg_admin_notice,
#wpbody .updated,
+#toplevel_page_ninja-forms,
.cms_tpv_promo_above_wrapper {
display: none !important;
}
#wpadminbar #toplevel_page_metaslider .dashicons-before:before {
content: "\f233" !important;
-}
\ No newline at end of file
+}
#wpadminbar #toplevel_page_metaslider .dashicons-before:before {
content: "\f233" !important;
-}
\ No newline at end of file
+}
+#toplevel_page_edit-post_type-nf_sub {
+ display: none;
+}