WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

MagpieRSS::__construct() public WP 1.0

PHP5 constructor.

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

Хуков нет.

Возвращает

Null. Ничего.

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

$MagpieRSS = new MagpieRSS();
$MagpieRSS->__construct( $source );

Код MagpieRSS::__construct() WP 5.5.2

<?php
function __construct( $source ) {

	# Check if PHP xml isn't compiled
	#
	if ( ! function_exists('xml_parser_create') ) {
		return trigger_error( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." );
	}

	$parser = xml_parser_create();

	$this->parser = $parser;

	# pass in parser, and a reference to this object
	# set up handlers
	#
	xml_set_object( $this->parser, $this );
	xml_set_element_handler($this->parser,
			'feed_start_element', 'feed_end_element' );

	xml_set_character_data_handler( $this->parser, 'feed_cdata' );

	$status = xml_parse( $this->parser, $source );

	if (! $status ) {
		$errorcode = xml_get_error_code( $this->parser );
		if ( $errorcode != XML_ERROR_NONE ) {
			$xml_error = xml_error_string( $errorcode );
			$error_line = xml_get_current_line_number($this->parser);
			$error_col = xml_get_current_column_number($this->parser);
			$errormsg = "$xml_error at line $error_line, column $error_col";

			$this->error( $errormsg );
		}
	}

	xml_parser_free( $this->parser );
	unset( $this->parser );

	$this->normalize();
}