Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_dropdown_cats [ WordPress Function ]

wp_dropdown_cats ( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 )
Parameters:
  • (unknown_type) $currentcat
  • (unknown_type) $currentparent
  • (unknown_type) $parent
  • (unknown_type) $level
  • (unknown_type) $categories
See:
Returns:
  • (unknown)
Defined at:



{@internal Missing Short Description}}

Source


<?php
function wp_dropdown_cats$currentcat 0$currentparent 0$parent 0$level 0$categories ) {
    
_deprecated_function__FUNCTION__'3.0''wp_dropdown_categories()' );
    if (!
$categories )
        
$categories get_categories( array('hide_empty' => 0) );

    if ( 
$categories ) {
        foreach ( 
$categories as $category ) {
            if ( 
$currentcat != $category->term_id && $parent == $category->parent) {
                
$pad str_repeat'&#8211; '$level );
                
$category->name esc_html$category->name );
                echo 
"\n\t<option value='$category->term_id'";
                if ( 
$currentparent == $category->term_id )
                    echo 
" selected='selected'";
                echo 
">$pad$category->name</option>";
                
wp_dropdown_cats$currentcat$currentparent$category->term_id$level +1$categories );
            }
        }
    } else {
        return 
false;
    }
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics