[wp-trac] [WordPress Trac] #31168: Comments should be turned off on pages by default
WordPress Trac
noreply at wordpress.org
Sun Jun 28 13:41:40 UTC 2015
#31168: Comments should be turned off on pages by default
-------------------------+---------------------------
Reporter: melchoyce | Owner: valendesigns
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.3
Component: Comments | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+---------------------------
Comment (by fabioneves):
Replying to [comment:10 rachelbaker]:
> Would a better approach here be to use `post_type_supports()`? Remove
`comments` from the `supports` array when the page type is registered.
>
> Sites could re-enable comments with `add_post_type_support( 'page',
'comments' );`
>
> Using `post_type_supports` checks is how the REST API will determine
what fields to include in endpoint responses.
This solution from @rachelbaker is much cleaner imo.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31168#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list