[buddypress-trac] [BuddyPress Trac] #4240: Make "get pagination" filters more conventionalized

buddypress-trac noreply at wordpress.org
Sat Jul 30 01:45:17 UTC 2016


#4240: Make "get pagination" filters more conventionalized
-------------------------+-----------------------------
 Reporter:  cklosows     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Core         |     Version:  1.5.5
 Severity:  minor        |  Resolution:
 Keywords:  needs-patch  |
-------------------------+-----------------------------

Comment (by tw2113):

 While we definitely can't remove the old ones, we can soft deprecate them
 and put the newly consistent ones immediately after.
 {{{
 $foo = apply_filters( 'old_filter', $thing, $thing );
 $foo = apply_filters( 'new_filter', $thing, $thing );
 }}}

 We can also move to conditionally assign the values from the old filters
 only if has_action/has_filter returns true. This would instead have us
 using the new hooks first, followed by the old ones.


 {{{
 $foo = apply_filters( 'new_filter', $thing, $thing );
 if ( has_filter( 'old_filter' ) ) {
     $foo = apply_filters( 'old_filter', $thing, $thing );
 }
 }}}

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


More information about the buddypress-trac mailing list