Plural_Forms::get
Get the plural form for a number.
Caches the value for repeated calls.
Method of the class: Plural_Forms{}
No Hooks.
Returns
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() Plural Forms::get code WP 6.9.1
public function get( $num ) {
if ( isset( $this->cache[ $num ] ) ) {
return $this->cache[ $num ];
}
$this->cache[ $num ] = $this->execute( $num );
return $this->cache[ $num ];
}