Changeset 8782 for trunk/wp-includes/rss.php
- Timestamp:
- 08/30/2008 09:23:43 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rss.php
r8572 r8782 388 388 389 389 if ( !function_exists('fetch_rss') ) : 390 /** 391 * Build Magpie object based on RSS from URL. 392 * 393 * @since unknown 394 * @package External 395 * @subpackage MagpieRSS 396 * 397 * @param string $url URL to retrieve feed 398 * @return bool|MagpieRSS false on failure or MagpieRSS object on success. 399 */ 390 400 function fetch_rss ($url) { 391 401 // initialize constants … … 516 526 endif; 517 527 528 /** 529 * Retrieve URL headers and content using Snoopy. 530 * 531 * @since unknown 532 * @package External 533 * @subpackage MagpieRSS 534 * 535 * @param string $url URL to retrieve 536 * @param array $headers Optional. Headers to send to the URL. 537 * @return Snoopy 538 */ 518 539 function _fetch_remote_file ($url, $headers = "" ) { 519 540 // Snoopy is an HTTP client in PHP … … 531 552 } 532 553 554 /** 555 * Retrieve 556 * 557 * @since unknown 558 * @package External 559 * @subpackage MagpieRSS 560 * 561 * @param unknown_type $resp 562 * @return unknown 563 */ 533 564 function _response_to_rss ($resp) { 534 565 $rss = new MagpieRSS( $resp->results ); … … 571 602 } 572 603 573 /*=======================================================================*\ 574 Function: init 575 Purpose: setup constants with default values 576 check for user overrides 577 \*=======================================================================*/ 604 /** 605 * Setup constants with default values, unless user overrides. 606 * 607 * @since unknown 608 * @package External 609 * @subpackage MagpieRSS 610 */ 578 611 function init () { 579 612 if ( defined('MAGPIE_INITALIZED') ) { … … 836 869 837 870 if ( !function_exists('wp_rss') ) : 871 /** 872 * Display all RSS items in a HTML ordered list. 873 * 874 * @since unknown 875 * @package External 876 * @subpackage MagpieRSS 877 * 878 * @param string $url URL of feed to display. Will not auto sense feed URL. 879 * @param int $num_items Optional. Number of items to display, default is all. 880 */ 838 881 function wp_rss( $url, $num_items = -1 ) { 839 882 if ( $rss = fetch_rss( $url ) ) { … … 861 904 862 905 if ( !function_exists('get_rss') ) : 906 /** 907 * Display RSS items in HTML list items. 908 * 909 * You have to specify which HTML list you want, either ordered or unordered 910 * before using the function. You also have to specify how many items you wish 911 * to display. You can't display all of them like you can with wp_rss() 912 * function. 913 * 914 * @since unknown 915 * @package External 916 * @subpackage MagpieRSS 917 * 918 * @param string $url URL of feed to display. Will not auto sense feed URL. 919 * @param int $num_items Optional. Number of items to display, default is all. 920 * @return bool False on failure. 921 */ 863 922 function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS 864 923 $rss = fetch_rss($url);
Note: See TracChangeset
for help on using the changeset viewer.