[wp-trac] [WordPress Trac] #33535: Comments for pages turned off by default
WordPress Trac
noreply at wordpress.org
Tue Aug 25 10:38:32 UTC 2015
#33535: Comments for pages turned off by default
-----------------------------+------------------------
Reporter: kostek00 | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Administration | Version: 4.3
Severity: normal | Resolution: duplicate
Keywords: | Focuses:
-----------------------------+------------------------
Changes (by swissspidy):
* status: new => closed
* resolution: => duplicate
* milestone: Awaiting Review =>
Comment:
Duplicate of #33516.
Hi there and welcome to trac.
This was [https://make.wordpress.org/core/2015/07/06/comments-are-now-
turned-off-on-pages-by-default/ changed by design] in #31168. As part of
these changes, the filter get_default_comment_status was introduced to
allow site owners to enable comments by default should they wish to. An
example:
{{{
function wp33535_open_comments_for_pages( $status, $post_type,
$comment_type ) {
if ( 'page' === $post_type ) {
$status = 'open';
}
return $status;
}
add_filter( 'get_default_comment_status',
'wp33516_open_comments_for_pages', 10, 3 );
}}}
Modern WordPress development is focused on including sensible defaults as
part of the core experience but allowing plugins to add settings for sites
that require them.
I'll close this ticket off for now, but you should feel free to add any
bug reports and feature requests in future.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33535#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list