translations_api хук-фильтр . WP 4.0.0
Allows a plugin to override the WordPress.org Translation Installation API entirely.
Использование
add_filter( 'translations_api', 'filter_function_name_6990', 10, 3 ); function filter_function_name_6990( $result, $type, $args ){ // filter... return $result; }
- $result(true/false/массив)
- The result object.
По умолчанию: false - $type(строка)
- The type of translations being requested.
- $args(объект)
- Translation API arguments.
Список изменений
С версии 4.0.0 | Введена. |
Где вызывается хук
translations_api
wp-admin/includes/translation-install.php 36
$res = apply_filters( 'translations_api', false, $type, $args );