[buddypress-trac] [BuddyPress Trac] #6482: Comment syncing between activity and post comments for Custom Post Types

buddypress-trac noreply at wordpress.org
Tue Dec 29 15:17:06 UTC 2015


#6482: Comment syncing between activity and post comments for Custom Post Types
--------------------------------------------------+-----------------------
 Reporter:  shanebp                               |       Owner:  imath
     Type:  enhancement                           |      Status:  assigned
 Priority:  normal                                |   Milestone:  2.5
Component:  Component - Blogs                     |     Version:  2.2
 Severity:  normal                                |  Resolution:
 Keywords:  needs-testing dev-feedback has-patch  |
--------------------------------------------------+-----------------------
Changes (by imath):

 * keywords:  needs-testing needs-unit-tests dev-feedback needs-refresh =>
     needs-testing dev-feedback has-patch


Comment:

 Hi all,

 I've made some progress on this ticket, 6482.03.patch :

 - is refreshed to latest trunk (r10429)
 - includes some new unittests, improves existing ones and is potentially
 fixing #6128
 - improves the wp-admin/activity screen (filtering + `BP_Activity_Table-
 List->can_comment`)
 - is potentially fixing #6793
 - now includes the upgrade routine i was talking about in a previous
 comment.
 - and is potentially fixing this ticket :)

 ==== Testing ====
 The regular post and comments are now fully using the Post Type
 activities, so you can test with this post type.

 You can also play with the Page post type, here's an example of code to
 add inside a bp-custom.php file :
 {{{
 function customize_page_tracking_args() {
     // Check if the Activity component is active before using it.
     if ( ! bp_is_active( 'activity' ) ) {
         return;
     }

     // Don't forget to add the 'buddypress-activity' support!
         add_post_type_support( 'page', 'buddypress-activity' );

         /**
          * Also don't forget to allow comments from the WordPress Edit
 Page screen
          * see this screencap https://cldup.com/nsl4TxBV_j.png
          */

     bp_activity_set_post_type_tracking_args( 'page', array(
         'action_id'                         => 'new_blog_page',
         'bp_activity_admin_filter'          => __( 'Published a new page',
 'custom-textdomain' ),
         'bp_activity_front_filter'          => __( 'Page', 'custom-
 textdomain' ),
         'bp_activity_new_post'              => __( '%1$s posted a new <a
 href="%2$s">page</a>', 'custom-textdomain' ),
         'bp_activity_new_post_ms'           => __( '%1$s posted a new <a
 href="%2$s">page</a>, on the site %3$s', 'custom-textdomain' ),
         'contexts'                          => array( 'activity', 'member'
 ),
         'comment_action_id'                 => 'new_blog_page_comment',
         'bp_activity_comments_admin_filter' => __( 'Commented a page',
 'custom-textdomain' ),
         'bp_activity_comments_front_filter' => __( 'Pages Comments',
 'custom-textdomain' ),
         'bp_activity_new_comment'           => __( '%1$s commented on the
 <a href="%2$s">page</a>', 'custom-textdomain' ),
         'bp_activity_new_comment_ms'        => __( '%1$s commented on the
 <a href="%2$s">page</a>, on the site %3$s', 'custom-textdomain' ),
         'position'                          => 100,
     ) );
 }
 add_action( 'bp_init', 'customize_page_tracking_args' );
 }}}

 You can test having the "syncing" feature on or not.

 I'd be very happy to have your feedbacks on this new patch.

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


More information about the buddypress-trac mailing list