[Bb-trac] [bbPress] #999: bb_get_location should apply filters even to cached result

bbPress bb-trac at lists.bbpress.org
Fri Nov 28 11:54:56 GMT 2008


#999: bb_get_location should apply filters even to cached result
----------------------------+-----------------------------------------------
 Reporter:  _ck_            |       Owner:     
     Type:  defect          |      Status:  new
 Priority:  normal          |   Milestone:     
Component:  Administration  |     Version:     
 Severity:  normal          |    Keywords:     
----------------------------+-----------------------------------------------
 I suggested that bb_get_location cache results and static was added to
 store the pattern but now the bb_get_location filter never fires for
 plugins because it runs at least once before plugins are executed and is
 saved as empty for undefined pages.

 so instead of

 {{{
 static $location;

         if ( isset($location) )
                 return $location;
 }}}


 it probably should be


 {{{
 static $file,$location;

         if ( isset($location) ) {
              if ( ( empty ($location) ) {
                 return apply_filters( 'bb_get_location', $location, $file
 );
                   }
              else { return $location; }
           }
 }}}

-- 
Ticket URL: <http://trac.bbpress.org/ticket/999>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list