WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/04/2017 01:29:59 AM (4 years ago)
Author:
pento
Message:

I18N: Introduce the Plural_Forms class.

Historically, we've evaluated the plural forms for each language using create_function(). This is being deprecated in PHP 7.2, so needs to be replaced.

The Plural_Forms class parses the Plural-Forms header from the PO file, and internally caches the result of all subsequent plural form tests, allowing it to match the performance of the existing code.

Props rmccue.
Fixes #41562.

File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.