MagpieRSS::normalize()

In this article

Source

function normalize () {
	// if atom populate rss fields
	if ( $this->is_atom() ) {
		$this->channel['description'] = $this->channel['tagline'];
		for ( $i = 0; $i < count($this->items); $i++) {
			$item = $this->items[$i];
			if ( isset($item['summary']) )
				$item['description'] = $item['summary'];
			if ( isset($item['atom_content']))
				$item['content']['encoded'] = $item['atom_content'];

			$this->items[$i] = $item;
		}
	}
	elseif ( $this->is_rss() ) {
		$this->channel['tagline'] = $this->channel['description'];
		for ( $i = 0; $i < count($this->items); $i++) {
			$item = $this->items[$i];
			if ( isset($item['description']))
				$item['summary'] = $item['description'];
			if ( isset($item['content']['encoded'] ) )
				$item['atom_content'] = $item['content']['encoded'];

			$this->items[$i] = $item;
		}
	}
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.