[buddypress-trac] [BuddyPress] #3460: Support custom post types in activity stream
buddypress-trac
noreply at wordpress.org
Wed May 22 16:22:15 UTC 2013
#3460: Support custom post types in activity stream
--------------------------+---------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: enhancement | Status: new
Priority: low | Milestone: 1.8
Component: Activity | Version: 1.2.8
Severity: normal | Resolution:
Keywords: |
--------------------------+---------------------------
Comment (by boonebgorges):
I'll leave the details of the implementation to the more UX-savvy, but I
think that karmatosed's reworkone and reworktwo don't totally capture the
issue that's being raised by Promethius Fire.
When CPTs are registered, they have a set of labels with them. For
example:
{{{
register_post_type( 'idea', array(
// ...
'labels' => array(
'name' => 'Ideas',
'singular_name' => 'Idea',
// ...
),
// ....
) );
}}}
So, if all we are trying to do in terms of customization is to grab the
name, we could just as easily do
{{{
$post_type = get_post_type_object( 'idea' );
$singular_name = $post_type->labels['singular_name'];
}}}
and then swap it into the skeleton action sentence like this:
{{{
$action = sprintf( '%s posted a new %s', $user_link, $singular_name );
}}}
In other words: we can already automate this. Adding a UI just to override
singular_name seems like it will only address the edge case where the user
doesn't like the singular_name that the CPT was registered with.
I (and, I think, Prometheus Fire) am more concerned with the case where
you don't like the "posted a new" phrasing. Maybe, in the case of 'ideas',
you want "x thought up a new idea". I have a feeling that this is going to
be the type of customizations that site owners want to make.
Unfortunately, allowing this kind of customization is much more
complicated in terms of UX. See 3460.png.
My impression (take it for what it is) is that *either* we provide this
level of customization, or we don't provide any customization at all (just
the toggles). Doing something in between will create extra UX for very
limited benefit.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3460#comment:17>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list