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 |
|---|---|
| 22 | ?> |
| 23 | <li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wptexturize(wp_specialchars($item['title'])); ?></a></li> |
| 24 | <?php } ?> |
| 25 | </ul> |
| 26 | <?php |
| 27 | } |
| 28 | break; |
| 29 | |
| 30 | case 'devnews' : |
| 31 | $rss = @fetch_rss(apply_filters( 'dashboard_primary_feed', 'http://wordpress.org/development/feed/' )); |
| 32 | if ( isset($rss->items) && 0 != count($rss->items) ) { |
| 33 | ?> |
| 34 | <h3><?php echo apply_filters( 'dashboard_primary_title', __('WordPress Development Blog') ); ?></h3> |
| 35 | <?php |
| 36 | $rss->items = array_slice($rss->items, 0, 3); |
| 37 | foreach ($rss->items as $item ) { |
| 38 | ?> |
| 39 | <h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> — <?php printf(__('%s ago'), human_time_diff(strtotime($item['pubdate'], time() ) ) ); ?></h4> |
| 40 | <p><?php echo $item['description']; ?></p> |