Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: widget_categories_dropdown_args

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
598                /**
599                 * Filter the arguments for the Categories widget drop-down.
600                 *
601                 * @since 2.8.0
602                 *
603                 * @see wp_dropdown_categories()
604                 *
605                 * @param array $cat_args An array of Categories widget drop-down arguments.
606                 */
607                wp_dropdown_categories( apply_filters( 'widget_categories_dropdown_args', $cat_args ) );
608 ?>
609
610 <script type='text/javascript'>
611 /* <![CDATA[ */
612 (function() {
613      var dropdown = document.getElementById( "<?php echo esc_js( $dropdown_id ); ?>" );
614      function onCatChange() {
615           if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {
616                location.href = "<?php echo home_url(); ?>/?cat=" + dropdown.options[ dropdown.selectedIndex ].value;