Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Custom post type tracking

  • @marcelo2605

    Participant

    I created my cpt using a plugin called Custom Post Type UI.

    In bp-custom.php file, I add this line: add_post_type_support( 'drawings', 'buddypress-activity' );

    It’s works fine: a default message was created in my activity tab after I create a drawings post.

    But when I try to change the message, nothing happens. The message keep the same:

     function customize_drawings_tracking_args() {
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        bp_activity_set_post_type_tracking_args( 'drawings', array(
            'component_id'             => buddypress()->blogs->id,
            'action_id'                => 'new_drawings',
            'bp_activity_admin_filter' => __( 'Published a new draw', 'custom-domain' ),
            'bp_activity_front_filter' => __( 'Drawings', 'custom-domain' ),
            'contexts'                 => array( 'activity', 'member' ),
            'activity_comment'         => true,
            'bp_activity_new_post'     => __( '%1$s posted a new <a href="%2$s">draw</a>', 'custom-textdomain' ),
            'bp_activity_new_post_ms'  => __( '%1$s posted a new <a href="%2$s">draw</a>, on the site %3$s', 'custom-textdomain' ),
            'position'                 => 100,
        ) );
    }
    add_action( 'bp_init', 'customize_drawings_tracking_args' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Custom post type tracking’ is closed to new replies.
Skip to toolbar