_response_to_rss [ WordPress Function ]
_response_to_rss ( $resp )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_reset_vars, _post_states, _get_post_ancestors, remove_editor_styles, register_post_status
Retrieve
Source
<?php
function _response_to_rss ($resp) {
$rss = new MagpieRSS( $resp->results );
// if RSS parsed successfully
if ( $rss && (!isset($rss->ERROR) || !$rss->ERROR) ) {
// find Etag, and Last-Modified
foreach( (array) $resp->headers as $h) {
// 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug "Undefined offset: 1"
if (strpos($h, ": ")) {
list($field, $val) = explode(": ", $h, 2);
}
else {
$field = $h;
$val = "";
}
if ( $field == 'etag' ) {
$rss->etag = $val;
}
if ( $field == 'last-modified' ) {
$rss->last_modified = $val;
}
}
return $rss;
} // else construct error message
else {
$errormsg = "Failed to parse RSS file.";
if ($rss) {
$errormsg .= " (" . $rss->ERROR . ")";
}
// error($errormsg);
return false;
} // end if ($rss and !$rss->error)
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Docs for page rss.php
unknown _response_to_rss (unknown_type $resp). unknown_type $resp. Documentation generated on Mon, 14 May 2012 23:19:12 +0000 by phpDocumentor ...
phpdoc.wordpress.org - RSS Feeds | Learn This
Site Feed (All content). Subscribe in a reader. Subscribe by email: One Response to “RSS Feeds”. Jeremy Day Says: November 22nd, 2008 at 1:35 PM ...
learnthis.ca - includes/magpierss/rss_fetch.php source - Mambo Developer
... 101 if ( is_success( $resp->status ) ) { 102 return _response_to_rss( $resp ); 103 } ... ( is_success( $resp->status ) ) { 175 $rss = _response_to_rss( $resp ); 176 if ...
mambo-developer.org - rss_fetch.inc
Mar 2, 2003 ... MAGPIE_CACHE_ON ) { // fetch file, and parse it $resp = _fetch_remote_file( $url ); if ( is_success( $resp->status ) ) { return _response_to_rss( ...
code.creativecommons.org