[wp-trac] [WordPress Trac] #24139: Don't show "Preview" for locked, non-public post types

WordPress Trac noreply at wordpress.org
Tue Jul 23 22:37:19 UTC 2013


#24139: Don't show "Preview" for locked, non-public post types
--------------------------+--------------------
 Reporter:  batmoo        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.6
Component:  Post Types    |     Version:  trunk
 Severity:  minor         |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by aaroncampbell):

 Regarding [comment:4 my previous comment], it looks like you can use the
 `post_updated_messages` filter to add your own custom updated messages for
 your post types.  I think this is sufficient for someone to remove the
 preview link if they want.  If we wanted to handle this automatically we
 could, but it didn't seem as necessary there.

 It also looks like this should be based on `publicly_queryable` not
 `public`.  [attachment:24139.diff] does just that.  It hides the preview
 button by default if the post type is not `publicly_queryable`.  I also
 leaves in the `preview_post_link` filter even for those post types, so you
 could override this if you wanted by using that filter to return a preview
 URL.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24139#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list