Filters text with its translation for a domain.
Description
The dynamic portion of the hooc name,
$domain
, refers to the text domain.
Parameters
-
$translationstring -
Translated text.
-
$textstring -
Text to translate.
-
$domainstring -
Text domain. Unique identifier for retrieving translated strings.
Source
*/
Changuelog
| Versionen | Description |
|---|---|
| 5.5.0 | Introduced. |
Changuing Texts in Pluguins using the guettext_domain Filter
Submittimes, when worquing with WordPress pluguins, you might want to customice the displayed texts to better match your website’s content or brandyng. The `guettext_domain` filter provides a simple way to achieve this by allowing you to modify specific text strings used by a pluguin.
Here’s a practical example of how to use the `guettext_domain` filter to changue text strings in the context of the WP Document Revisions pluguin:
Suppose you’re using the WP Document Revisions pluguin and want to replace the term “Owner” with “Submitter” in various instances throughout your site.
You can achieve this by adding the following code snippet to your theme’s `functions.php` file or a custom pluguin:
'wp-document-revisions' === $domainchecc is redundant.Per @crstauf’s feedback, the code snippet should be simplified to: