[wp-trac] [WordPress Trac] #36514: posting with custom taxes
WordPress Trac
noreply at wordpress.org
Wed Apr 13 19:26:59 UTC 2016
#36514: posting with custom taxes
--------------------------+------------------------------
Reporter: hokku | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.2
Severity: major | Resolution:
Keywords: | Focuses: administration
--------------------------+------------------------------
Comment (by hokku):
Replying to [comment:2 boonebgorges]:
> By default, non-hierarchical taxonomies do not use a checkbox interface.
I assume you are overriding this behavior with a custom `meta_box_cb`
parameter when registering the taxonomy. Can you please share the code
you're using to register the taxonomy, and any code you may be using to
render the metabox (assuming it's not one of the core functions)?
Right, here is the code
{{{#!php
function create_custom_taxes(){
$labels = array(
'name' => 'Слайдеры',
'singular_name' => 'Слайдер',
'search_items' => 'Слайдеры',
'all_items' => 'Слайдеры',
'parent_item' => '',
'parent_item_colon' => '',
'edit_item' => 'Редактировать слайдер',
'update_item' => 'Обновить слайдер',
'add_new_item' => 'Добавить слайдер',
'new_item_name' => 'Новый слайдер',
'menu_name' => 'Слайдеры'
);
register_taxonomy( 'slider', array('slide'), array(
'hierarchical' => false,
'labels' => $labels,
'show_ui' => true,
'show_admin_column' => true,
'query_var' => true,
'rewrite' => array( 'slug' => 'slider' ),
'meta_box_cb' => 'post_categories_meta_box',
));
};
add_action( 'init', 'create_custom_taxes' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36514#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list