#20098 closed defect (bug) (invalid)
Non-publicly queryable posts should not allow preview
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3.1 |
Component: | General | Keywords: | dev-feedback 2nd-opinion |
Focuses: | Cc: |
Description
Custom post types which have publicly_queryable=false but show_ui=true should not show a preview button in the admin. Similarly, the slug editor should also be hidden and the 'View post' link should not be displayed in the published message.
Looking at the core code, it seems to be a simple matter of updating it to look at the publicly_queryable property instead of the public meta property.
If approved, I can have a go at creating a patch.
In the meantime, attached is a bit of PHP which modifies the output buffer to achieve the same result.
Attachments (1)
Change History (6)
#1
follow-up:
↓ 2
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
#2
in reply to:
↑ 1
@
11 years ago
- Keywords dev-feedback 2nd-opinion added
Replying to nacin:
I don't understand this counter-argument. 'public' is a meta property. We shouldn't be using its value to determine behaviour. If publicly_queryable
isn't a suitable property to use to determine if a post type can be viewed at its permalink then we need another property for this purpose.
#3
follow-up:
↓ 4
@
11 years ago
public isn't a meta property. While other properties inherit from it, it has its own purpose as well.
http://core.trac.wordpress.org/ticket/17040#comment:24
If publicly_queryable isn't a suitable property to use to determine if a post type can be viewed at its permalink then we need another property for this purpose.
I would like to hear the use case (in a new ticket).
#4
in reply to:
↑ 3
@
11 years ago
Replying to nacin:
public isn't a meta property. While other properties inherit from it, it has its own purpose as well.
Looks like the Codex and the inline docs need some clarification. The Codex gives the impression this is a meta argument which only sets the default values of other arguments. The inline doc is incorrect altogether.
If publicly_queryable isn't a suitable property to use to determine if a post type can be viewed at its permalink then we need another property for this purpose.
I would like to hear the use case (in a new ticket).
Will do.
Remove preview button