WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
1938 | /** |
1939 | * Filter the arguments used in retrieving the comment list. |
1940 | * |
1941 | * @since 4.0.0 |
1942 | * |
1943 | * @see wp_list_comments() |
1944 | * |
1945 | * @param array $r An array of arguments for displaying comments. |
1946 | */ |
1947 | $r = apply_filters( 'wp_list_comments_args', $r ); |
1948 |
|
1949 | // Figure out what comments we'll be looping through ($_comments) |
1950 | if ( null !== $comments ) { |
1951 | $comments = (array) $comments; |
1952 | if ( empty($comments) ) |
1953 | return; |
1954 | if ( 'all' != $r['type'] ) { |
1955 | $comments_by_type = separate_comments($comments); |
1956 | if ( empty($comments_by_type[$r['type']]) ) |