[buddypress-trac] [BuddyPress Trac] #6335: Blank pages overload

buddypress-trac noreply at wordpress.org
Tue Mar 31 17:49:44 UTC 2015


#6335: Blank pages overload
--------------------------+----------------------
 Reporter:  danbp         |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  highest       |   Milestone:
Component:  API           |     Version:  2.2
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |
--------------------------+----------------------
Changes (by r-a-y):

 * keywords:  reporter-feedback =>
 * status:  new => closed
 * resolution:   => invalid
 * severity:  critical => normal
 * milestone:  Awaiting Review =>


Comment:

 This is the offending code:

 {{{
 function tt_get_comments_status()
 {
         global $post;
         //do this only in page, to force comment open for all pages in
 WordPress posts table,
         //let showing of comments template decide by our theme's custom
 post meta only
         if (is_page()) {
                 $_post = get_post($post->ID);
                 //if by default page comments is closed, we set to open.
                 if ($_post->comment_status == 'closed') {
                         $update_post                   = array();
                         $update_post['ID']             = $post->ID;
                         $update_post['comment_status'] = 'open';
                         $update_post['ping_status'] = 'open';
                         wp_update_post($update_post);
                 }
         }
 }
 add_action('template_redirect', 'tt_get_comments_status');
 }}}

 This code is not good at all.

 You can remove this with the following code snippet:

 `remove_action('template_redirect', 'tt_get_comments_status');`

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6335#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list