#17584 closed enhancement (wontfix)
Add post_type_supports filter
Reported by: | mitchoyoshitaka | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch needs-refresh |
Focuses: | Cc: |
Description
The post_type_supports return value should be filter-able, and there's even a @todo in the code to that effect.
Attachments (1)
Change History (11)
#2
follow-up:
↓ 3
@
13 years ago
Couldn't the same effect be achieved by using add_post_type_support() and remove_post_type_support() ?
There's no filter on current_theme_supports() either.
#3
in reply to:
↑ 2
@
13 years ago
Replying to scribu:
Couldn't the same effect be achieved by using add_post_type_support() and remove_post_type_support() ?
There's no filter on current_theme_supports() either.
The use case I'm thinking of is for enforcing a certain combination of support features, or disallowing certain combinations. In particular, for this plugin, I want to ensure that post types that support 'xmldoc' do not support 'editor'. I don't think there's a good way to do that right now... filtering on add_post_type_support would be an alternative, though, but I think this has more flexibility.
#4
@
13 years ago
i also think this would be quite useful. i'm using the verve meta boxes plugin and the gd custom posttypes plugin and want to have a post type which does not "support custom fields" - that is that it would not display that meta box, but i would like to be able to add a custom meta box on the side using the verve plugin. rather than rewriting the verve meta plugin i think it would be easier to get the desired behavior using this filter. so +1
#7
@
9 years ago
- Keywords needs-refresh added
- Milestone changed from Awaiting Review to 4.4
- Owner changed from mitchoyoshitaka to chriscct7
- Severity changed from trivial to normal
- Status changed from new to assigned
#8
@
9 years ago
- Milestone 4.4 deleted
- Resolution set to wontfix
- Status changed from assigned to closed
This is basically obsolete since [23722] - use add_post_type_support()
#10
@
9 years ago
When all of the post types are registered, you can remove the support for editor from the types that support xmldoc using those funcs - turning off support on the fly isn't a feature I see a lot of people screaming for. I remember when Mitcho was talking about this stuff in SF in 2011 at WordCamp. If he wants to reopen the ticket, he can.
I'm thinking that
$args
as inarray_slice( func_get_args(), 2 );
should get passed along. That can be quite helpful. As an example, we use it for post thumbnails by post type. We can also remove the otherwise commented code.