[buddypress-trac] [BuddyPress Trac] #6177: Improve representation of blog posts in the Activity Stream

buddypress-trac noreply at wordpress.org
Tue Mar 10 02:02:03 UTC 2015


#6177: Improve representation of blog posts in the Activity Stream
----------------------------------+-----------------------
 Reporter:  DJPaul                |       Owner:  DJPaul
     Type:  enhancement           |      Status:  accepted
 Priority:  normal                |   Milestone:  2.3
Component:  Component - Activity  |     Version:
 Severity:  normal                |  Resolution:
 Keywords:  2nd-opinion           |
----------------------------------+-----------------------

Comment (by r-a-y):

 The use of bitmasks in `BP_Media_Extractor` is interesting.

 So if I wanted to grab only audio and video, I would do something like
 this?

 `$stuff = BP_Media_Extractor::extract( $text, BP_Media_Extractor::AUDIO |
 BP_Media_Extractor::VIDEO );`

 Neat!

 ----

 I think `bp_activity_create_summary()` can be tweaked so we do not search
 for featured images and galleries unnecessarily.  Featured images and
 galleries are really only WP things, so we should only attempt these types
 of extractions if the activity type is a blog post or custom post type.

 If possible, I would love to move the `extract_images_from_galleries()`
 and `extract_images_from_featured_images()` class method logic to the
 Blogs component, while maintaining how the `BP_Media_Extractor` class
 works (in particular, the bitmasks).  Though, I do see how that might be
 difficult to implement.

 That being said, I think it's neat to have a media extractor in core!  I
 can see a plugin adding some description to activity items such as `This
 activity item has two images and one embedded video` or something like
 that.

 Nice work, Paul!

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


More information about the buddypress-trac mailing list