}
function wp_dashboard_incoming_links() {
- wp_dashboard_cached_rss_widget( 'dashboard_incoming_links', 'wp_dashboard_incoming_links_output' );
+ echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
}
/**
echo "<ul>\n";
- $count = 0;
- foreach ( $rss->get_items() as $item ) {
+ if ( !isset($items) )
+ $items = 10;
+
+ foreach ( $rss->get_items(0, $items) as $item ) {
$publisher = '';
$site_link = '';
$link = '';
$link = esc_url( strip_tags( $item->get_link() ) );
$author = $item->get_author();
- $site_link = esc_url( strip_tags( $author->get_link() ) );
+ if ( $author ) {
+ $site_link = esc_url( strip_tags( $author->get_link() ) );
- if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
- $publisher = __( 'Somebody' );
+ if ( !$publisher = esc_html( strip_tags( $author->get_name() ) ) )
+ $publisher = __( 'Somebody' );
+ } else {
+ $publisher = __( 'Somebody' );
+ }
if ( $site_link )
$publisher = "<a href='$site_link'>$publisher</a>";
else
}
function wp_dashboard_primary() {
- wp_dashboard_cached_rss_widget( 'dashboard_primary', 'wp_dashboard_rss_output' );
+ echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
}
function wp_dashboard_primary_control() {
}
function wp_dashboard_secondary() {
- wp_dashboard_cached_rss_widget( 'dashboard_secondary', 'wp_dashboard_secondary_output' );
+ echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
}
function wp_dashboard_secondary_control() {
}
function wp_dashboard_plugins() {
- wp_dashboard_cached_rss_widget( 'dashboard_plugins', 'wp_dashboard_plugins_output', array(
- 'http://wordpress.org/extend/plugins/rss/browse/popular/',
- 'http://wordpress.org/extend/plugins/rss/browse/new/',
- 'http://wordpress.org/extend/plugins/rss/browse/updated/'
- ) );
+ echo '<p class="widget-loading hide-if-no-js">' . __( 'Loading…' ) . '</p><p class="describe hide-if-js">' . __('This widget requires JavaScript.') . '</p>';
}
/**