MagpieRSS::normalize()publicWP 1.0

Метод класса: MagpieRSS{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

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

Код MagpieRSS::normalize() WP 6.4.3

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