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

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 12 16:02:36 GMT 2008


#8146: Quick tag/category edit appears to be using filtered data
-------------------------------+--------------------------------------------
 Reporter:  jhodgdon           |        Owner:  anonymous
     Type:  defect             |       Status:  reopened 
 Priority:  normal             |    Milestone:  2.7      
Component:  Administration     |      Version:  2.7      
 Severity:  normal             |   Resolution:           
 Keywords:  reporter-feedback  |  
-------------------------------+--------------------------------------------
Comment (by jhodgdon):

 My multilingual plugin filters tags, categories, etc. so that only one
 language is displayed at a time, though both appear in the tag name. For
 example, a particular tag might show up as "stuff" in English, and "cosas"
 in Spanish, with the tag name containing some language codes, as well as
 the words "stuff" and "cosas".

 In [9621], my observation is that if I click "edit", I get the whole tag
 name, but if I click "quick edit", I only see "stuff" or "cosas", not the
 whole tag name with both languages and the language codes. So something is
 passing the tag name through filters before putting it into the quick edit
 block.

 I haven't had time to debug this and find where it is in the code, but
 it's probably from the function get_term() in wp-includes/taxonomy.php,
 which has an argument $filter. If $filter is set to 'display', then all
 the standard plugin filters are called to alter the term name before
 returning it. If it is set to 'raw', then no filters are applied (which is
 what you need for editing, so you are editing the raw data from the
 database). Based on what I am observing, it is set to 'display' when the
 call to get_term() is made when setting up Quick Edit. That is incorrect.

 Does that help?

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


More information about the wp-trac mailing list