Plural_Forms::get()publicWP 4.9.0

Get the plural form for a number.

Caches the value for repeated calls.

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

Хуков нет.

Возвращает

int. Plural form value.

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

$Plural_Forms = new Plural_Forms();
$Plural_Forms->get( $num );
$num(int) (обязательный)
Number to get plural form for.

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

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

Код Plural_Forms::get() WP 6.1.1

public function get( $num ) {
	if ( isset( $this->cache[ $num ] ) ) {
		return $this->cache[ $num ];
	}
	$this->cache[ $num ] = $this->execute( $num );
	return $this->cache[ $num ];
}