Plural_Forms::get()publicWP 4.9.0

Get the plural form for a number.

Caches the value for repeated calls.

Method of the class: Plural_Forms{}

No Hooks.

Return

Int. Plural form value.

Usage

$Plural_Forms = new Plural_Forms();
$Plural_Forms->get( $num );
$num(int) (required)
Number to get plural form for.

Changelog

Since 4.9.0 Introduced.

Plural_Forms::get() code WP 6.4.3

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