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

buddypress-trac noreply at wordpress.org
Sat Mar 14 20:29: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:  has-patch             |

Comment (by DJPaul):


 > I would love to move the extract_images_from_galleries() and
 extract_images_from_featured_images() class method logic to the Blogs

 This is a good question and shows you took time to read the code
 carefully, so thank you. :)

 Originally, I went to build the extractor as a static class, and
 galleries/featured images were in a child class
 ("BP_Media_Extractor_Post"). I had to give up on this due to inheritance
 issues with calling re-implemented methods (if we supported a later PHP
 version, Late Static Binding would have fixed this). It was also fiddly
 because then (we) would need to know when to use either one, and that's a
 bit fiddly. You can find some commits where I started re-factoring the
 here], and
 This] was when I hit upon the current implementation.

 My biggest objection to moving the methods mentioned into the Blogs
 component, the potential complexity of that aside, is that I am not sure
 there is a good reason to require the Featured Image extractor to work
 only when the Blogs component is active. I see this as more of a general
 purpose library, like what we often seem to be building nowadays
 (suggestions, this, the attachments API).

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

More information about the buddypress-trac mailing list