MagpieRSS::normalize()publicWP 1.0

Method of the class: MagpieRSS{}

No Hooks.

Return

null. Nothing (null).

Usage

$MagpieRSS = new MagpieRSS();
$MagpieRSS->normalize ();

MagpieRSS::normalize() code WP 6.6.2

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;
		}
	}
}