X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4f9d63e13cd8c6e275797c75b401b074b82937bc..9c2096d803812dacbdf6cf8efe90053e39f00b96:/wp-includes/rss.php diff --git a/wp-includes/rss.php b/wp-includes/rss.php index 6feefdcb..88bfa62d 100644 --- a/wp-includes/rss.php +++ b/wp-includes/rss.php @@ -394,7 +394,7 @@ if ( !function_exists('fetch_rss') ) : /** * Build Magpie object based on RSS from URL. * - * @since unknown + * @since 1.5.0 * @package External * @subpackage MagpieRSS * @@ -532,7 +532,7 @@ endif; /** * Retrieve URL headers and content using WP HTTP Request API. * - * @since unknown + * @since 1.5.0 * @package External * @subpackage MagpieRSS * @@ -555,7 +555,7 @@ function _fetch_remote_file($url, $headers = "" ) { // Snoopy returns headers unprocessed. // Also note, WP_HTTP lowercases all keys, Snoopy did not. $return_headers = array(); - foreach ( $resp['headers'] as $key => $value ) { + foreach ( wp_remote_retrieve_headers( $resp ) as $key => $value ) { if ( !is_array($value) ) { $return_headers[] = "$key: $value"; } else { @@ -565,10 +565,10 @@ function _fetch_remote_file($url, $headers = "" ) { } $response = new stdClass; - $response->status = $resp['response']['code']; - $response->response_code = $resp['response']['code']; + $response->status = wp_remote_retrieve_response_code( $resp ); + $response->response_code = wp_remote_retrieve_response_code( $resp ); $response->headers = $return_headers; - $response->results = $resp['body']; + $response->results = wp_remote_retrieve_body( $resp ); return $response; } @@ -576,7 +576,7 @@ function _fetch_remote_file($url, $headers = "" ) { /** * Retrieve * - * @since unknown + * @since 1.5.0 * @package External * @subpackage MagpieRSS * @@ -626,7 +626,7 @@ function _response_to_rss ($resp) { /** * Set up constants with default values, unless user overrides. * - * @since unknown + * @since 1.5.0 * @package External * @subpackage MagpieRSS */ @@ -871,7 +871,7 @@ if ( !function_exists('wp_rss') ) : /** * Display all RSS items in a HTML ordered list. * - * @since unknown + * @since 1.5.0 * @package External * @subpackage MagpieRSS * @@ -891,7 +891,7 @@ function wp_rss( $url, $num_items = -1 ) { '
  • %3$s
  • ', esc_url( $item['link'] ), esc_attr( strip_tags( $item['description'] ) ), - htmlentities( $item['title'] ) + esc_html( $item['title'] ) ); } @@ -911,7 +911,7 @@ if ( !function_exists('get_rss') ) : * to display. You can't display all of them like you can with wp_rss() * function. * - * @since unknown + * @since 1.5.0 * @package External * @subpackage MagpieRSS * @@ -926,7 +926,7 @@ function get_rss ($url, $num_items = 5) { // Like get posts, but for RSS foreach ( (array) $rss->items as $item ) { echo "
  • \n"; echo ""; - echo htmlentities($item['title']); + echo esc_html($item['title']); echo "
    \n"; echo "
  • \n"; }