Ok. I’m sorry. I thought this was sounding familiar and it does because I fixed this bug for my next update.
Open your admin.php file and replace the bulk_quick_edit_custom_box() function with the following:
public function bulk_quick_edit_custom_box( $column_name, $post_type ) {
global $cpt_onomies_manager;
// allows bulk and quick edit whether the column was added via WordPress register_taxonomy() or CPT-onomies.
// WP < 3.5 is added via CPT-onomies, WP >= 3.5 is added via register_taxonomy()'s 'show_admin_column'.
$taxonomy = NULL;
if ( strpos( $column_name, CPT_ONOMIES_UNDERSCORE ) !== false )
$taxonomy = strtolower( str_replace( CPT_ONOMIES_UNDERSCORE . '_', '', $column_name ) );
else if ( strpos( $column_name, 'taxonomy-' ) !== false )
$taxonomy = strtolower( str_replace( 'taxonomy-', '', $column_name ) );
if ( $taxonomy && taxonomy_exists( $taxonomy ) && $cpt_onomies_manager->is_registered_cpt_onomy( $taxonomy ) ) {
$tax = get_taxonomy( $taxonomy );
?><fieldset class="inline-edit-col-center inline-edit-<?php echo $taxonomy; ?>"><div class="inline-edit-col">
<span class="title inline-edit-<?php echo $taxonomy; ?>-label"><?php echo esc_html( $tax->labels->name ) ?>
<span class="catshow">[<?php _e( 'more', CPT_ONOMIES_TEXTDOMAIN ); ?>]</span>
<span class="cathide" style="display:none;">[<?php _e( 'less', CPT_ONOMIES_TEXTDOMAIN ); ?>]</span>
</span>
<ul class="cat-checklist cpt-onomy-checklist cpt-onomy-<?php echo esc_attr( $taxonomy )?>">
<?php wp_terms_checklist( NULL, array( 'taxonomy' => $taxonomy, 'walker' => new CPTonomy_Walker_Terms_Checklist() ) ); ?>
</ul>
<?php // these variables help with processing/saving the info ?>
<input type="hidden" name="is_bulk_quick_edit" value="true" />
<input type="hidden" name="<?php echo 'assign_cpt_onomies_' . $taxonomy . '_rel'; ?>" value="true" />
</div></fieldset><?php
}
}
Also, replace the add_cpt_onomy_admin_column() function:
public function add_cpt_onomy_admin_column( $columns, $post_type='page' ) {
global $cpt_onomies_manager;
foreach( get_object_taxonomies( $post_type, 'objects' ) as $taxonomy => $tax ) {
// make sure its a registered CPT-onomy
if ( $cpt_onomies_manager->is_registered_cpt_onomy( $taxonomy ) ) {
// "show_admin_column" works for you but you still have capability
// to remove column, via filter, if desired. In this case,
// "show_admin_column" must already be set to true, which is similar
// to previous setup where the column was added by default and you
// just used the filter to remove it.
if ( get_bloginfo( 'version' ) >= 3.5 ) {
// if the column already exists, this filter allows you
// to remove the column by returning false.
if ( array_key_exists( 'taxonomy-' . $taxonomy, $columns )
&& ! apply_filters( 'custom_post_type_onomies_add_cpt_onomy_admin_column', true, $taxonomy, $post_type ) ) {
// remove the column
unset( $columns[ 'taxonomy-' . $taxonomy ] );
}
}
// backwards compatability
else {
// this filter allows you to remove the column by returning false
if ( apply_filters( 'custom_post_type_onomies_add_cpt_onomy_admin_column', ( isset( $tax->show_admin_column ) && ! $tax->show_admin_column ) ? false : true, $taxonomy, $post_type ) ) {
// want to add before comments and date
$split = -1;
$comments = array_search( 'comments', array_keys( $columns ) );
$date = array_search( 'date', array_keys( $columns ) );
if ( $comments !== false || $date !== false ) {
if ( $comments !== false && $date !== false )
$split = ( $comments < $date ) ? $comments : $date;
else if ( $comments !== false && $date === false )
$split = $comments;
else if ( $comments === false && $date !== false )
$split = $date;
}
// new column
$new_column = array( CPT_ONOMIES_UNDERSCORE . '_' . $taxonomy => __( $tax->label, CPT_ONOMIES_TEXTDOMAIN ) );
// add somewhere in the middle
if ( $split > 0 ) {
$beginning = array_slice( $columns, 0, $split );
$end = array_slice( $columns, $split );
$columns = $beginning + $new_column + $end;
}
// add at the beginning
else if ( $split == 0 )
$columns = $new_column + $columns;
// add at the end
else
$columns += $new_column;
}
}
}
}
return $columns;
}