[wp-trac] [WordPress Trac] #44902: Update codex doc for function register_taxonomy
WordPress Trac
noreply at wordpress.org
Thu Sep 6 13:07:46 UTC 2018
#44902: Update codex doc for function register_taxonomy
--------------------------+---------------------------------------
Reporter: ercartman | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.9.8
Severity: normal | Keywords: needs-docs needs-dev-note
Focuses: docs |
--------------------------+---------------------------------------
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
<?php
'meta_box_sanitize_cb' => 'taxonomy_meta_box_sanitize_cb_checkboxes'
}}}
After that, the save works without errors.
Please, add this param to documentation.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44902>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list