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 |
---|---|
126 | </form> |
127 |
|
128 | <ul class="view-switch"> |
129 | <li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'detail', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Detail View') ?></a></li> |
130 | <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li> |
131 | </ul> |
132 |
|
133 | <?php |
134 |
|
135 | $comments_per_page = apply_filters('comments_per_page', 20, $comment_status); |
136 |
|
137 | if ( isset( $_GET['apage'] ) ) |
138 | $page = abs( (int) $_GET['apage'] ); |
139 | else |
140 | $page = 1; |
141 |
|
142 | $start = $offset = ( $page - 1 ) * $comments_per_page; |
143 |
|
144 | list($_comments, $total) = _wp_get_comment_list( $comment_status, $search_dirty, $start, $comments_per_page + 5 ); // Grab a few extra |