Opened 12 years ago
Closed 12 years ago
#27794 closed enhancement (wontfix)
Always use visibility:private when creating new posts
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.8.2 |
| Component: | Posts, Post Types | Keywords: | |
| Focuses: | Cc: |
Description
I am using Wordpress as a private information repository.
I have to manually switch the post type from public to private EVERY SINGLE TIME that I create a new post and there isn't an option to set all posts to private by default.
I can change it in the core files but that is hardly a solution, as I will have to apply the change every time I update.
Could you add an option to select the default type of post (public or private) in the next version of Wordpress?
Change History (6)
#1
@
12 years ago
- Component changed from Security to Posts, Post Types
- Type changed from feature request to enhancement
#2
follow-up:
↓ 3
@
12 years ago
Thanks, I have already implemented it. But what happens when I update Wordpress, will the changes be lost?
Can you add "Default Post Visibility" to "Writing Settings" ( /wp-admin/options-writing.php)in the next Wordpress version ?
#3
in reply to:
↑ 2
@
12 years ago
- Keywords close added
Replying to SkyHiRider:
Thanks, I have already implemented it. But what happens when I update Wordpress, will the changes be lost?
The function should preferably be placed in a plugin and will run on every pageload (nn the editor pages). It might also go into functions.php of a (child) theme that will never be updated automatically.
Can you add "Default Post Visibility" to "Writing Settings" ( /wp-admin/options-writing.php)in the next Wordpress version ?
I doubt that, as decisions, not options, is the philosophy. The strength of WordPress is the ability to do such things through hooks.
A workaround:
function set_default_post_status_27794() { if ( 'auto-draft' === $GLOBALS['post']->post_status ) { $GLOBALS['post']->post_status = 'private'; } } add_action( 'do_meta_boxes', 'set_default_post_status_27794' );