Skip to main content
Fixed typos
Source Link
MikeSchinkel
  • 37.5k
  • 14
  • 116
  • 132

From the code in /wp-includes/widgets.php for the WP_Category_Widget class we have the following code (line 438 in WordPress v3.0.4):

$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
if ( $d ) {
  $cat_args['show_option_none'] = __('Select Category');

wp_dropdown_categories(
  apply_filters('widget_categories_dropdown_args',$cat_args)
);

From that I would surmise that the hook 'widget_categories_dropdown_args' wouldshould allow you to set an 'orderby' parameter?

P.S. Have you ever considered using (something like) PhpStorm? As you ask lots of "How can I get access to..." kind of questions so you'd probably find yourself an order of magnitude more productive if you had a tool like PhpStorm that could quickly get you these answers. Just a thought...

From the code in /wp-includes/widgets.php for the WP_Category_Widget class we have the following code (line 438 in WordPress v3.0.4):

$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
if ( $d ) {
  $cat_args['show_option_none'] = __('Select Category');

wp_dropdown_categories(
  apply_filters('widget_categories_dropdown_args',$cat_args)
);

From that I would surmise that the hook 'widget_categories_dropdown_args' would allow you to set an 'orderby' parameter?

P.S. Have you ever considered using (something like) PhpStorm? As you ask lots of "How can I get access to..." kind of questions so you'd probably find yourself an order of magnitude more productive if you had a tool like PhpStorm that could quickly get you these answers. Just a thought...

From /wp-includes/widgets.php for the WP_Category_Widget class we have the following code (line 438 in WordPress v3.0.4):

$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
if ( $d ) {
  $cat_args['show_option_none'] = __('Select Category');

wp_dropdown_categories(
  apply_filters('widget_categories_dropdown_args',$cat_args)
);

From that I would surmise the hook 'widget_categories_dropdown_args' should allow you to set an 'orderby' parameter?

P.S. Have you ever considered using (something like) PhpStorm? As you ask lots of "How can I get access to..." kind of questions you'd probably find yourself an order of magnitude more productive if you had a tool like PhpStorm that could quickly get you these answers. Just a thought...

Source Link
MikeSchinkel
  • 37.5k
  • 14
  • 116
  • 132

From the code in /wp-includes/widgets.php for the WP_Category_Widget class we have the following code (line 438 in WordPress v3.0.4):

$cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h);
if ( $d ) {
  $cat_args['show_option_none'] = __('Select Category');

wp_dropdown_categories(
  apply_filters('widget_categories_dropdown_args',$cat_args)
);

From that I would surmise that the hook 'widget_categories_dropdown_args' would allow you to set an 'orderby' parameter?

P.S. Have you ever considered using (something like) PhpStorm? As you ask lots of "How can I get access to..." kind of questions so you'd probably find yourself an order of magnitude more productive if you had a tool like PhpStorm that could quickly get you these answers. Just a thought...