async_update_translation
Filter HookDescription
Filters whether to asynchronously update translation for core, a plugin, or a theme.Hook Information
File Location |
wp-admin/includes/class-language-pack-upgrader.php
View on GitHub
|
Hook Type | Filter |
Line Number | 81 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$update
|
Whether to update. |
object
|
$language_update
|
The update offer. |
Usage Examples
Basic Usage
<?php
// Hook into async_update_translation
add_filter('async_update_translation', 'my_custom_filter', 10, 2);
function my_custom_filter($update, $language_update) {
// Your custom filtering logic here
return $update;
}
Source Code Context
wp-admin/includes/class-language-pack-upgrader.php:81
- How this hook is used in WordPress core
<?php
76 * @since 4.0.0
77 *
78 * @param bool $update Whether to update.
79 * @param object $language_update The update offer.
80 */
81 $update = apply_filters( 'async_update_translation', $update, $language_update );
82
83 if ( ! $update ) {
84 unset( $language_updates[ $key ] );
85 }
86 }
PHP Documentation
<?php
/**
* Filters whether to asynchronously update translation for core, a plugin, or a theme.
*
* @since 4.0.0
*
* @param bool $update Whether to update.
* @param object $language_update The update offer.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/class-language-pack-upgrader.php
Related Hooks
Related hooks will be displayed here in future updates.