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 |
---|---|
44 | ?> |
45 |
|
46 | <?php |
47 | break; |
48 |
|
49 | case 'planetnews' : |
50 | $rss = @fetch_rss(apply_filters( 'dashboard_secondary_feed', 'http://planet.wordpress.org/feed/' )); |
51 | if ( isset($rss->items) && 0 != count($rss->items) ) { |
52 | ?> |
53 | <h3><?php echo apply_filters( 'dashboard_secondary_title', __('Other WordPress News') ); ?></h3> |
54 | <ul> |
55 | <?php |
56 | $rss->items = array_slice($rss->items, 0, 20); |
57 | foreach ($rss->items as $item ) { |
58 | $title = wp_specialchars($item['title']); |
59 | $author = preg_replace( '|(.+?):.+|s', '$1', $item['title'] ); |
60 | $post = preg_replace( '|.+?:(.+)|s', '$1', $item['title'] ); |
61 | ?> |
62 | <li><a href='<?php echo wp_filter_kses($item['link']); ?>'><span class="post"><?php echo $post; ?></span><span class="hidden"> - </span><cite><?php echo $author; ?></cite></a></li> |