WP_Scripts::set_translations

SummerySummery

Sets a translation textdomain.

Syntax

WP_Scripts::set_translations( string $handle, string $domain = 'default', string $path = null )

ParametersParameters

$handle

(string) (Required) Name of the script to register a translation domain to.

$domain

(string) (Optional) Text domain.

Default value: 'default'

$path

(string) (Optional) The full file path to the directory containing translation files.

Default value: null

ReturnReturn

(bool) True if the text domain was registered, false if not.

SourceSource

File: wp-includes/class.wp-scripts.php


			

ChangelogChangelog

Changelog
Version Description
5.1.0 The $domain parameter was made optional.
5.0.0 Introduced.
Scroll to Top