Use cached feed data on the Dashboard, props DD32, #9483
git-svn-id: http://svn.automattic.com/wordpress/trunk@10901 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d2cea69a8
commit
005fd4f14f
|
@ -838,20 +838,14 @@ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = ar
|
||||||
$check_urls = array( $widgets[$widget_id]['url'] );
|
$check_urls = array( $widgets[$widget_id]['url'] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include_once ABSPATH . WPINC . '/class-feed.php';
|
||||||
/* TODO Cache check here.
|
|
||||||
foreach ( $check_urls as $check_url ) {
|
foreach ( $check_urls as $check_url ) {
|
||||||
|
$cache = new WP_Feed_Cache_Transient('', md5($check_url), '');
|
||||||
if ( 'HIT' !== $status ) {
|
if ( ! $cache->load() ) {
|
||||||
echo $loading;
|
echo $loading;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Always load async until above fixed.
|
|
||||||
echo $loading;
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ( $callback && is_callable( $callback ) ) {
|
if ( $callback && is_callable( $callback ) ) {
|
||||||
$args = array_slice( func_get_args(), 2 );
|
$args = array_slice( func_get_args(), 2 );
|
||||||
|
|
Loading…
Reference in New Issue