Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: category_css_class

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
194                 * @since 4.2.0
195                 *
196                 * @see wp_list_categories()
197                 *
198                 * @param array  $css_classes An array of CSS classes to be applied to each list item.
199                 * @param object $category    Category data object.
200                 * @param int    $depth       Depth of page, used for padding.
201                 * @param array  $args        An array of wp_list_categories() arguments.
202                 */
203                $css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) );
204
205                $output .=  ' class="' . $css_classes . '"';
206                $output .= ">$link\n";
207           } elseif ( isset( $args['separator'] ) ) {
208                $output .= "\t$link" . $args['separator'] . "\n";
209           } else {
210                $output .= "\t$link<br />\n";
211           }
212      }