хук-фильтр since 4.0.0

translations_api_result

Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.

Сигнатура

apply_filters( 'translations_api_result', array|WP_Error $res, string $type, object $args )

Описание

Фильтрует результаты ответа API установки переводов.

Фильтруемое значение

On success an associative array of translations, WP_Error on failure.
  • translations array List of translations, each an array of data.
    • ...$0 array
      • language stringLanguage code.
      • version stringWordPress version.
      • updated stringDate the translation was last updated, in MySQL datetime format.
      • english_name stringEnglish name of the language.
      • native_name stringNative name of the language.
      • package stringURL to download the translation package.
      • iso string[]Array of ISO language codes.
      • strings arrayArray of translated strings used in the installation process.
        }
      $typestringThe type of translations being requested.$argsobjectTranslation API arguments. Source
      return apply_filters( 'translations_api_result', $res, $type, $args );
      

      View all references View on Trac View on GitHub

      Related
      Used byDescription
      translations_api()wp-admin/includes/translation-install.php

      Retrieve translations from WordPress Translation API.

      Changelog
      VersionDescription
      4.0.0Introduced.
    User Contributed Notes

    You must log in before being able to contribute a note or feedback.

Параметры

$res array|WP_Error обязательный
On success an associative array of translations, WP_Error on failure.
  • translations array List of translations, each an array of data.
    • ...$0 array
      • language stringLanguage code.
      • version stringWordPress version.
      • updated stringDate the translation was last updated, in MySQL datetime format.
      • english_name stringEnglish name of the language.
      • native_name stringNative name of the language.
      • package stringURL to download the translation package.
      • iso string[]Array of ISO language codes.
      • strings arrayArray of translated strings used in the installation process.
        }
      $typestringThe type of translations being requested.$argsobjectTranslation API arguments. Source
      return apply_filters( 'translations_api_result', $res, $type, $args );
      

      View all references View on Trac View on GitHub

      Related
      Used byDescription
      translations_api()wp-admin/includes/translation-install.php

      Retrieve translations from WordPress Translation API.

      Changelog
      VersionDescription
      4.0.0Introduced.
    User Contributed Notes

    You must log in before being able to contribute a note or feedback.

Исходный код

wp-admin/includes/translation-install.php:141

return apply_filters( 'translations_api_result', $res, $type, $args );

История изменений

ВерсияОписание
4.0.0 Introduced.

Что будем искать? Например,Продвижение

Этот сайт использует куки-файлы. Оставаясь на сайте, Вы соглашаетесь на их использование. Для получения дополнительной информации, пожалуйста, ознакомьтесь с политикой в отношении персональных данных.