[buddypress-trac] [BuddyPress Trac] #6312: post_type_support - ajax changes the activity entry action
buddypress-trac
noreply at wordpress.org
Sat Mar 21 15:05:39 UTC 2015
#6312: post_type_support - ajax changes the activity entry action
----------------------------------+-----------------------------
Reporter: shanebp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Component - Activity | Version: 2.2.1
Severity: normal | Keywords:
----------------------------------+-----------------------------
WordPress 4.1.1 running any WP included theme.
In the activity stream, the item action is being changed to the generic
'wrote a new item' if a Show filter is used OR any tab is clicked.
When first loading an activity page, site-wide or personal, the entry
shows the same action that is in that row in the database:
[[Image(http://philopress.com/event1.jpg)]]
After I use _any filter OR click any tab, the entry changes to this:
[[Image(http://philopress.com/event2.jpg)]]
The only way to return to showing the entry action as stored in the
database is to reload the page.
I create a cpt:
{{{
register_post_type( 'event', ...
"supports" => array("title", "editor", "thumbnail", "author",
"comments", "trackbacks", "buddypress-activity")
}}}
I edit the activity attributes:
{{{
function event_tracking_args_activity() {
if ( ! bp_is_active( 'activity' ) )
return;
bp_activity_set_post_type_tracking_args( 'event', array(
'action_id' => 'new_event',
'bp_activity_admin_filter' => __( 'Events', 'custom-domain' ),
'bp_activity_front_filter' => __( 'Events', 'custom-domain' ),
'contexts' => array( 'activity', 'member' ),
'activity_comment' => true,
'bp_activity_new_post' => __( '%1$s created a new <a
href="%2$s">Event</a>', 'custom-domain' ),
'bp_activity_new_post_ms' => __( '%1$s created a new <a
href="%2$s">Event</a>, on the site %3$s', 'custom-domain' ),
'position' => 100,
) );
}
add_action( 'bp_init', 'event_tracking_args_activity' );
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6312>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list