Opened 15 years ago
Closed 12 years ago
#15218 closed defect (bug) (invalid)
Publish box (inner-sidebar) hidden in custom posts without show_ui
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0.1 |
Component: | Posts, Post Types | Keywords: | close |
Focuses: | Cc: |
Description
I'm pretty sure this is a bug as I can't figure out a reason for the following:
Create a new custom post type with show_ui => true (which is supposed to hide the menus for it if false). Create a post, go to the post edit screen. Now edit the plugin code and switch true to false for show_ui. Hit refresh and the inner-sidebar is gone.
Is this expected behavior and, if it is?!?!... how should it be handled? Some people need to manage the custom posts by themselves and not have then show up in the menu, trash can,... but they need the editor, scheduling and such.
Thanks a lot.
Change History (7)
#1
follow-up:
↓ 2
@
15 years ago
- Milestone changed from Awaiting Review to 3.1
- Severity changed from blocker to normal
#2
in reply to:
↑ 1
@
15 years ago
Replying to nacin:
There is currently no way to disable edit.php and keep post.php however, you'd have to do that using hooks and a manual wp_die() as appropriate. How would you access the editor without going from a list of posts?
Having a add_menu_page listing my custom post types using query_posts() or directly from the database...? And using get_edit_post_link() to get the edit link plus overriding user_has_cap() to disable deletion possibility and only allow to delete from my own management screen keeping things in order...
#4
in reply to:
↑ 3
@
15 years ago
Replying to jane:
Just don't block access to post.php if show_ui is false. Patch it to show #inner-sidebar in post.php no matter what the show_ui says.
Would be better to add a new argument (in register_post_type) to block access to post.php editing of a custom post if someone wants that (but it can be done on a case by case basis).
The Submit box may be replicated if missing but the entire sidebar hidden is a loss of space for small metaboxes and hacking it hard makes updating a PITA.
The bug you found is that post.php is accessible without show_ui.
show_ui is supposed to control edit.php and post.php.
In 3.1 there is show_in_menu that allows you to remove it from the menu. (#14145)
There is currently no way to disable edit.php and keep post.php however, you'd have to do that using hooks and a manual wp_die() as appropriate. How would you access the editor without going from a list of posts?