Gettext_Translations::set_header()publicWP 2.8.0

Sets translation headers.

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

Хуков нет.

Возвращает

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

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

$Gettext_Translations = new Gettext_Translations();
$Gettext_Translations->set_header( $header, $value );
$header(строка) (обязательный)
-
$value(строка) (обязательный)
-

Список изменений

С версии 2.8.0 Введена.

Код Gettext_Translations::set_header() WP 6.5.2

public function set_header( $header, $value ) {
	parent::set_header( $header, $value );
	if ( 'Plural-Forms' === $header ) {
		list( $nplurals, $expression )     = $this->nplurals_and_expression_from_header( $this->get_header( 'Plural-Forms' ) );
		$this->_nplurals                   = $nplurals;
		$this->_gettext_select_plural_form = $this->make_plural_form_function( $nplurals, $expression );
	}
}