WordPress.org

Make WordPress Core

Ticket #4154: google-blogsearch.diff

File google-blogsearch.diff, 1.2 KB (added by Otto42, 8 years ago)

Change technorati lookup to Google on the dashboard.

  • wp-admin/index-extra.php

     
    77switch ( $_GET['jax'] ) { 
    88 
    99case 'incominglinks' : 
    10 $rss = @fetch_rss('http://feeds.technorati.com/cosmos/rss/?url='. trailingslashit(get_option('home')) .'&partner=wordpress'); 
    11 if ( isset($rss->items) && 1 < count($rss->items) ) { // Technorati returns a 1-item feed when it has no results 
     10$rss = @fetch_rss('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'))); 
     11if ( isset($rss->items) && 1 < count($rss->items) ) {  
    1212?> 
    13 <h3><?php _e('Incoming Links'); ?> <cite><a href="http://www.technorati.com/search/<?php echo trailingslashit(get_option('home')); ?>?partner=wordpress"><?php _e('More &raquo;'); ?></a></cite></h3> 
     13<h3><?php _e('Incoming Links'); ?> <cite><a href="http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:<?php echo trailingslashit(get_option('home')); ?>"><?php _e('More &raquo;'); ?></a></cite></h3> 
    1414<ul> 
    1515<?php 
    1616$rss->items = array_slice($rss->items, 0, 10);