[wp-trac] [WordPress Trac] #28006: Add visual cues when viewing drafts on the frontend

WordPress Trac noreply at wordpress.org
Thu Apr 24 08:07:30 UTC 2014


#28006: Add visual cues when viewing drafts on the frontend
-------------------------------+-----------------------------
 Reporter:  hlashbrooke        |      Owner:
     Type:  enhancement        |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  trunk
 Severity:  normal             |   Keywords:
  Focuses:  ui                 |
-------------------------------+-----------------------------
 This is a relatively minor issue, but I've often had the problem where I
 think a post is published because I can view it on the frontend and there
 is nothing on the page that indicates that I am viewing a draft. If this
 happens to me from time to time then I'm sure it happens to other users
 too.

 I propose adding a few unobtrusive visual cues to the single post page
 that indicates that you are viewing a draft. I have attached my changes
 here - they include:

 * Adding "(Draft)" to the end the 'edit post' text in the admin bar
 * Adding "(Draft)" to the end of the default link generated by {{{
 edit_post_link() }}}
 * Adding a new body class to single post pages: {{{ single-status-{status}
 }}}

 These changes are minor enough to not break the existing display, yet
 significant enough to clearly show that you are currently viewing a draft.
 The addition of the post status to the body class will also help with
 customising the page according to the current status.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28006>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list