Changeset 18879
- Timestamp:
- 10/04/2011 05:21:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/screen.php
r18874 r18879 367 367 * @param mixed $args Associative array of arguments particular to the default $option or the HTML string to be printed in the Screen Options tab. 368 368 */ 369 public function add_option( $option = false, $args) {369 public function add_option( $option, $args = null ) { 370 370 if ( is_array($args) && !empty($option) ) 371 371 $this->_options[ $option ] = $args; 372 elseif ( is_string($args) ) 373 $this->_options['_screen_settings'] .= $args; 372 elseif ( is_string($option) ) 373 $this->_options['_screen_settings'] .= $option; 374 else 375 return false; 374 376 375 377 $this->_show_options = true; 378 return true; 376 379 } 377 380 … … 414 417 // Ensure we have title and ID. 415 418 if ( ! $args['title'] || ! $args['id'] ) 416 return ;419 return false; 417 420 418 421 $this->_help_tabs[] = $args; 422 return true; 419 423 } 420 424 … … 443 447 444 448 // Intended for adding Help and Screen Options. 445 do_action('add_screen_help_and_options' );449 do_action('add_screen_help_and_options', $this); 446 450 447 451 // Call old contextual_help_list filter.
Note: See TracChangeset
for help on using the changeset viewer.