#44902 closed defect (bug) (duplicate)
Update codex doc for function register_taxonomy
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.9.8 |
| Component: | Taxonomy | Keywords: | needs-docs |
| Focuses: | docs | Cc: |
Description
I registered a new taxonomy.
And added post_categories_meta_box to my post type.
But if I saved the post with a taxonomy, an error occurred.
Created new taxonomy with name = id of selected taxonomy.
I checked the errors and found that on my server the $_POST data is transmitted with the type string
But custom taxonomy does not sanitize values by default.
I found param meta_box_sanitize_cb in WordPress source and added to attr when I call a function register_taxonomy:
<?php 'meta_box_sanitize_cb' => 'taxonomy_meta_box_sanitize_cb_checkboxes'
After that, the save works without errors.
Please, add this param to documentation.
Change History (3)
#3
@
5 years ago
- Keywords needs-dev-note removed
Since this was closed out as a duplicate, I'm removing needs-dev-note. However, the ticket this one was closed in favor of did receive a developer note, which can be found here: https://make.wordpress.org/core/2019/01/23/improved-taxonomy-metabox-sanitization-in-5-1/.
Duplicate of #36514.