walk_category_dropdown_tree

Retrieve HTML dropdown (select) content for category list.

Description

(string) walk_category_dropdown_tree(); 

Returns (string)


Usage

  1. if ( !function_exists( 'walk_category_dropdown_tree' ) ) { 
  2. require_once ABSPATH . WPINC . '/category-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = walk_category_dropdown_tree(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/category-template.php  
  1. function walk_category_dropdown_tree() { 
  2. $args = func_get_args(); 
  3. // the user's options are the third parameter 
  4. if ( empty( $args[2][walker] ) || ! ( $args[2][walker] instanceof Walker ) ) { 
  5. $walker = new Walker_CategoryDropdown; 
  6. } else { 
  7. $walker = $args[2][walker]; 
  8. return call_user_func_array( array( $walker, 'walk' ), $args );