[wp-trac] [WordPress Trac] #19827: remove_help_tab() not working as expected

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 13 20:26:13 UTC 2012


#19827: remove_help_tab() not working as expected
----------------------------+-----------------------------
 Reporter:  tfnab           |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:  3.3.1
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------------
 remove_help_tab takes $id as a parameter. this is either confusing or
 wrong. the method does the following:

 unset( $this->_help_tabs[ $id ] );

 but since add_help_tab simply does this:

 $this->_help_tabs[] = $args;

 you have to call remove_help_tab with numerical values such as 0, 1, 2
 etc. but not the 'this-id' passed in e.g.

 add_help_tab(array('id'=>'this-id',//...

 in addition if you remove the zero element, initially there is no active
 tab on the help tab.

 fix attached. this makes the following line remove the previously created
 tab:

 remove_help_tab('this-id');

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19827>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list