I’d like to have a submenu item in the admin section link directly to the edit form for a specific post ID, a custom post type at that.
Basically looking at using the add_submenu_page function to add the menu item http://codex.wordpress.org/Function_Reference/add_submenu_page which is easy.
Any ideas how to write a callback function to display the edit form for a specific post ID (which, in this case, happens to be a custom post type)?
You do not need a callback function at all.
You could display (yet another) custom edit screen, but if the custom post type is set up correctly you should be able to reach it simply by pointing to
http://yourdomain.com/wp-admin/post.php?post=9999&action=edit
where9999
is any post ID that corresponds to a post of said type.Hence you can use
post.php?post=9999&action=edit
as the menu slug (see the codex page of add_menu_page for reference on parameters) withadd_submenu_page
and you’re good to go:The last parameter, the callback function, you don’t need at all.