[wp-trac] [WordPress Trac] #17609: 'View post' link shown even when post type can't be viewed on the front-end
WordPress Trac
wp-trac at lists.automattic.com
Sun Jul 17 07:51:30 UTC 2011
#17609: 'View post' link shown even when post type can't be viewed on the front-end
-----------------------------------------+-----------------------------
Reporter: scribu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Post Types | Version:
Severity: normal | Resolution:
Keywords: has-patch reporter-feedback |
-----------------------------------------+-----------------------------
Changes (by mfields):
* cc: michael@… (added)
* keywords: => has-patch reporter-feedback
Comment:
I verified this while running trunk with my own custom post type. I've put
together a patch which works well for me. This solution should work for
all post_types. it will only print links to the front-end if the post type
is "publicly queryable".
In hindsight, I think that the patch may do too much. I've also added code
to dynamically populate the nouns in each message where appropriate.
Instead of hardcoding "Post" it will use the singular label from the
post_types labels array. This deviates a bit from the scope of this
ticket. I thought that while I was in there I might as well address these
issues too.
Definitely needs testing.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17609#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list