All Topics
Inline edits for Taxonomy with single choice
Hi, You sent me the following code snippet to make a specific taxonomy column to a prefilled drop down. It stopped working. Can you check it?
I’d also like to add another taxonomy: “review” to prefill the drop down.
function my_acp_taxonomy_selectbox( $data, $column ) {
if ( $column instanceof ACP_Column_Post_Taxonomy ) {
if ( 'status' === $column->get_taxonomy() ) {
$data['type'] = 'select';
$data['options'] = acp_editing_helper()->get_terms_list( array(
'taxonomy' => $column->get_taxonomy(),
'hide_empty' => false,
) );
}
}
return $data;
}
add_filter( 'acp/editing/view_settings', 'my_acp_taxonomy_selectbox', 10, 2 );
Thanks, Doug
You must be logged in to reply to this topic.