[wp-meta] [Making WordPress.org] #5030: WordCamp activity in Profiles shouldn't say "coming up on [date]" for past dates

Making WordPress.org noreply at wordpress.org
Fri Feb 14 01:34:14 UTC 2020


#5030: WordCamp activity in Profiles shouldn't say "coming up on [date]" for past
dates
--------------------------+---------------------
 Reporter:  valentinbora  |       Owner:  (none)
     Type:  defect        |      Status:  new
 Priority:  low           |   Milestone:
Component:  Profiles      |  Resolution:
 Keywords:  has-patch     |
--------------------------+---------------------
Changes (by valentinbora):

 * keywords:  needs-patch => has-patch


Comment:

 @dd32 apparently not all of it is open source, so I'd love to fix history
 on the fly through an adaptation of the following:

 {{{#!php
 add_filter( 'bp_activity_get', function( $payload ) {
         if ( !empty($payload['activities'] ) && is_array(
 $payload['activities'] ) ) {
                 foreach ( $payload['activities'] as &$activity ) {
                         if ( 'wordcamp' === $activity->component ) {
                                 $activity->action = substr(
 $activity->action, 0, strpos( $activity->action, 'coming up on' ) );
                         }
                 }
         }

         return $payload;
 });
 }}}

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5030#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list