Title: Plural_Forms::__construct
Published: November 20, 2017
Last modified: April 28, 2025

---

# Plural_Forms::__construct( string $str )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#wp--skip-link--target)

Constructor.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#parameters)󠁿

 `$str`stringrequired

Plural function (just the bit after `plural=` from Plural-Forms)

## 󠀁[Source](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#source)󠁿

    ```php
    public function __construct( $str ) {
    	$this->parse( $str );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/pomo/plural-forms.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/pomo/plural-forms.php#L83)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/pomo/plural-forms.php#L83-L85)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#related)󠁿

| Uses | Description | 
| [Plural_Forms::parse()](https://developer.wordpress.org/reference/classes/plural_forms/parse/)`wp-includes/pomo/plural-forms.php` |

Parse a Plural-Forms string into tokens.

  |

| Used by | Description | 
| [WP_Translation_File::make_plural_form_function()](https://developer.wordpress.org/reference/classes/wp_translation_file/make_plural_form_function/)`wp-includes/l10n/class-wp-translation-file.php` |

Makes a function, which will return the right translation index, according to the plural forms header.

  | 
| [Gettext_Translations::make_plural_form_function()](https://developer.wordpress.org/reference/classes/gettext_translations/make_plural_form_function/)`wp-includes/pomo/translations.php` |

Makes a function, which will return the right translation index, according to the plural forms header.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/plural_forms/__construct/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.9.0](https://developer.wordpress.org/reference/since/4.9.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fplural_forms%2F__construct%2F)
before being able to contribute a note or feedback.