Opened 14 years ago
Closed 14 years ago
#15982 closed defect (bug) (fixed)
Attachment taxonomies broken
Reported by: | nacin | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | blocker | Version: | |
Component: | General | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
This works in 3.0. It does not in RC1.
add_action( 'init', function() { // create a new taxonomy register_taxonomy( 'people', array( 'attachment:image', 'attachment:video', 'attachment:audio' ), array( 'label' => __('People'), 'template' => __('People: %l.'), 'helps' => __('Separate people with commas.'), 'sort' => true, 'args' => array('orderby' => 'term_order'), 'rewrite' => array('slug' => 'person'), ) ); }
Attachments (1)
Change History (7)
#3
@
14 years ago
Originally reported over wp-hackers. http://lists.automattic.com/pipermail/wp-hackers/2010-December/036954.html
Reporter mentions one other issue, "The taxonomy listing page in the front end returns no results." Not sure what's going wrong there, and whether that's addressed by this patch, caused by a plugin, or if we need to account for something else perhaps in our taxonomy query logic.
#4
@
14 years ago
- Keywords commit added
Patch is good to go. Probably want to leave open for the final point in the initial report.
Note: See
TracTickets for help on using
tickets.
sanitize_key() is killing the colons. In 3.0, we took $object_type at face value. (An unstrict sanitize_user doesn't strip the colons, either.)
Suggest we simply revert [16822] for taxonomy.php. It was a good faith change, but we didn't previously sanitize there, and there's no real need either. The object type has to match a sanitized key anyway (usually), so it doesn't hurt to accept anything here.