WP HOOKS
filtrod 4.0.0

translations_api_result

Args 3Plik wp-admin/includes/translation-install.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the Translation Installation API response results.

Parametry

ParametrTypOpis
$resarray | \WP_Error{ On success an associative array of translations, WP_Error on failure. @type array $translations { List of translations, each an array of data. @type array ...$0 { @type string $language Language code. @type string $version WordPress version. @type string $updated Date the translation was last updated, in MySQL datetime format. @type string $english_name English name of the language. @type string $native_name Native name of the language. @type string $package URL to download the translation package. @type string[] $iso Array of ISO language codes. @type array $strings Array of translated strings used in the installation process. } } }
$typestringThe type of translations being requested.
$argsobjectTranslation API arguments.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'translations_api_result', 'twoja_funkcja', 10, 3 );

function twoja_funkcja($param_1, $param_2, $param_3) {
	// Twój kod
}

Popularne w tej kategorii