[buddypress-trac] [BuddyPress] #3455: BuddyPress activity comment recording for Blog posts does not honour the WordPress post type visibility

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Aug 12 17:33:37 UTC 2011


#3455: BuddyPress activity comment recording for Blog posts does not honour the
WordPress post type visibility
-------------------------+-----------------------
 Reporter:  sbrajesh     |       Owner:
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  1.5
Component:  Blogs        |     Version:  1.5
 Severity:  minor        |  Resolution:
 Keywords:  2nd-opinion  |
-------------------------+-----------------------

Comment (by cnorris23):

 I don't think it's too late for no. 3. If we're already making a change
 like this, we might as well do what we can to ease the burden. I don't
 know exactly what you're thinking boone, but here's what I have in my head
 as a possible solution (sorry, I'm not at me dev setup so I can't write a
 patch):

 {{{
 bp_blogs_record_comment_for_post_type( $post_type = '' ) {
      $retval = true;

      if ( 'post' != $post_type )
           retval = false;

      return apply_filters( 'bp_blogs_record_comment_for_post_type',
 $retval, $post_type );
 }
 }}}

 The post_type check would then change to:
 {{{
 if ( !bp_blogs_record_comment_for_post_type(
 $recorded_comment->post->post_type ) )
      return false;
 }}}

 For annointed, you could then do this:
 {{{
 my_record_comments_for_post_type( $retval, $post_type ) {
      if ( 'sermons' == $post_type || 'devotionals' == $post_type )
           $retval = true;

      return $retval;
 }
 }}}

 Something similar could be done for bp_blogs_record_post().

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3455#comment:8>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list