Advertisement
Guest User

Functions

a guest
May 18th, 2012
674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. <?php
  2.     class dropdown extends Walker_CategoryDropdown {
  3.         function start_el(&$output, $category, $depth, $args) {
  4.             $pad = str_repeat('&nbsp;', $depth * 3);
  5.             $cat_name = apply_filters( 'list_cats', $category->name, $category );
  6.             $output .= "\t<option class=\"level-$depth\" value=\"".$category->slug."\"";
  7.             $output .= '>';
  8.             $output .= $pad.$cat_name;
  9.             if ( $args['show_count'] )
  10.                 $output .= '&nbsp;&nbsp;('. $category->count .')';
  11.             if ( $args['show_last_update'] ) {
  12.                 $format = 'Y-m-d';
  13.             $output .= '&nbsp;&nbsp;' . gmdate($format, $category->last_update_timestamp);
  14.             }
  15.             $output .= "</option>\n";
  16.         }
  17.     }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement