Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: dashboard_incoming_links_feed

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
2 require_once('admin.php');
3 require_once (ABSPATH . WPINC . '/rss.php');
4
5 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
6
7 switch ( $_GET['jax'] ) {
8
9 case 'incominglinks' :
10
11 $rss_feed = apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) );
12 $more_link = apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) );
13
14 $rss = @fetch_rss( $rss_feed );
15 if ( isset($rss->items) && 1 < count($rss->items) ) { // Technorati returns a 1-item feed when it has no results
16 ?>
17 <h3><?php _e('Incoming Links'); ?> <cite><a href="<?php echo htmlspecialchars( $more_link ); ?>"><?php _e('More &raquo;'); ?></a></cite></h3>
18 <ul>
19 <?php
20 $rss->items = array_slice($rss->items, 0, 10);