wp_widget_rss_process [ WordPress Function ]
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Process RSS feed widget data and optionally retrieve feed items.
The feed widget can not have more than 20 items or it will reset back to the default, which is 10.
The resulting array has the feed title, feed url, feed link (from channel), feed items, error (if any), and whether to show summary, author, and date. All respectively in the order of the array elements.
Source
<?php
function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
$items = (int) $widget_rss['items'];
if ( $items < 1 || 20 < $items )
$items = 10;
$url = esc_url_raw(strip_tags( $widget_rss['url'] ));
$title = trim(strip_tags( $widget_rss['title'] ));
$show_summary = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0;
$show_author = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0;
$show_date = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0;
if ( $check_feed ) {
$rss = fetch_feed($url);
$error = false;
$link = '';
if ( is_wp_error($rss) ) {
$error = $rss->get_error_message();
} else {
$link = esc_url(strip_tags($rss->get_permalink()));
while ( stristr($link, 'http') != $link )
$link = substr($link, 1);
$rss->__destruct();
unset($rss);
}
}
return compact( 'title', 'url', 'link', 'items', 'error', 'show_summary', 'show_author', 'show_date' );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_widget_rss_process
Function and Method Cross Reference. wp_widget_rss_process(). Defined at: / wp-includes/default-widgets.php -> line 962. Referenced 2 times: ...
phpxref.ftwr.co.uk - WordPress › Support » Want to reverse WP Default RSS Widget List
$old_instance['url'] ) ) ); return wp_widget_rss_process( $new_instance, $testurl ) ;. } Not quite sure though if this is right. Below is the rest of the RSS code I ...
wordpress.org - PHPXRef 0.7 : WordPress (Trunk) : Detail view of default-widgets.php
update() form() wp_widget_rss_output() wp_widget_rss_form() wp_widget_rss_process(). WP_Widget_Tag_Cloud:: (5 methods): __construct() widget() update() ...
lab.yukei.net - wp_widget_rss_form (WordPress Function) - WPSeek.com
Similar Functions: wp_widget_rss_output, wp_widget_rss_process, wp_widget_control, wp_widgets_init, wp_ajax_widgets_order. Display RSS widget options ...
wpseek.com