[wp-trac] [WordPress Trac] #37518: New term.php is showing warning for rearranged columns using manage_{$screen->id}_columns filter

WordPress Trac noreply at wordpress.org
Fri Jul 29 19:41:30 UTC 2016


#37518: New term.php is showing warning for rearranged columns using
manage_{$screen->id}_columns filter
--------------------------+-----------------------------
 Reporter:  wzislam       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  ui            |
--------------------------+-----------------------------
 == Main Issue: ==

 Declared custom column and sorted them using `unset()` for my Custom
 Taxonomy for CPT:

 {{{#!php
 <?php
 function mytax_icon_column( $columns ) {
     unset( $columns['cb'] );
     unset( $columns['name'] );

     $new_columns = array();
     $new_columns['cb']      = $columns['cb'];
     $new_columns['name']    = $columns['name'];
     $new_columns['icon']    = 'Icon';
     return array_merge( $new_columns, $columns );
 }
 add_filter( 'manage_edit-mytax_columns', 'mytax_icon_column' );
 }}}

 and in the Term edit page
 (`/term.php?taxonomy=mytax&tag_ID=224&post_type=cpt&wp_http_referer=%2Fwp-
 admin%2Fedit-tags.php%3Ftaxonomy%3Dmytax%26post_type%3Dcpt`) it's
 displaying

 {{{
 Notice: Undefined index: cb in /home/path/public_html/path/wp-
 content/plugins/myplugin/plugin-file.php on line 240
 Notice: Undefined index: name in /home/path/public_html/path/wp-
 content/plugins/myplugin/plugin-file.php on line 241
 }}}

 But it's not showing any warning message in earlier version (i.e. 4.5.2)
 where term's using `edit-tags.php`.

 == Secondary Issue: ==

 When I edit a term, under the '''Screen Options''' there are checkboxes
 denoting columns. But where are the columns? The checkboxes has no effect
 on this particular screen. They are good fit for the Term listing page
 only.

 Can we sort these out?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37518>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list