Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dashboard
- Posts
- Media
- Forms
- -Forms
- -New Form
- -Entries
- add_action( 'admin_menu', 'wpse_admin_menu', 100 );
- function wpse_admin_menu()
- {
- global $menu, $submenu;
- $parent = 'gf_edit_forms';
- if( !isset($submenu[$parent]) )
- return;
- foreach( $submenu[$parent] as $k => $d ){
- if( $d['2'] == 'gf_entries' )
- {
- $submenu[$parent][$k]['2'] = 'admin.php?page=gf_entries&id=2';
- break;
- }
- }
- }
- unset($submenu['gf_edit_forms']['2']);
- add_filter( 'gform_addon_navigation', 'add_menu_item' );
- function add_menu_item( $menu_items ) {
- $menu_items[] = array( "name" => "gf_entries&id=2", "label" => "Entries", "callback" => "gf_entries&id=2", "permission" => "gform_full_access" ); //edit_posts
- return $menu_items;
- }
- add_action('admin_head', 'my_custom_fonts');
- function my_custom_fonts() {
- echo '<style>
- #toplevel_page_gf_edit_forms > ul > li:nth-child(4){
- display:none !important;
- }
- </style>';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement