[wp-trac] Re: [WordPress Trac] #8146: Quick tag/category edit appears to be using filtered data

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 18 21:34:16 GMT 2008


#8146: Quick tag/category edit appears to be using filtered data
----------------------------------------------------+-----------------------
 Reporter:  jhodgdon                                |        Owner:  anonymous
     Type:  defect                                  |       Status:  closed   
 Priority:  normal                                  |    Milestone:  2.7      
Component:  Administration                          |      Version:  2.7      
 Severity:  normal                                  |   Resolution:  fixed    
 Keywords:  tag, category, edit, filter, has-patch  |  
----------------------------------------------------+-----------------------
Comment (by azaozz):

 Replying to [comment:36 jhodgdon]:
 > Leaving those 'cat_rows' etc. filters in there means it is not fixed for
 anyone who was using those filters previously, because those filters were
 only being used in prior versions of WP for filtering displayed data, and
 now they are being applied to editable data (in the quick edit fields). So
 I am reopening this again.

 True, but that doesn't make any difference for most user cases and can
 easily be separated by a small regexp. I think these filters were meant
 for manipulating the entire table rows, like adding content, converting
 from table row to list, even replacing the entire HTML, etc. Not sure if
 any plugins are using them though.

 > I am also attaching a patch that reverts [9751] and does all the
 filtering in a more rational way (now that the underlying cache problem
 has been fixed), and also removes the 'cat_rows' filtering.

 I like the previous solution too, however that reintroduces an
 inconsistency that was there. If we are applying display filters to all
 fields in _cat_row and link_cat_row, we probably should do the same for
 _tag_row too. So instead of just
 {{{
 $name = apply_filters( 'term_name', $tag->name );
 }}}
 it should be
 {{{
 $tag = sanitize_term($tag, 'post_tag');
 }}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8146#comment:42>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list