update-custom_(action)
Fires when a custom plugin or theme update request is received.
The dynamic portion of the hook name, $action, refers to the action provided in the request for wp-admin/update.php. Can be used to provide custom update functionality for themes and plugins.
Использование
add_action( 'update-custom_(action)', 'wp_kama_update_custom_action' ); /** * Function for `update-custom_(action)` action-hook. * * @return void */ function wp_kama_update_custom_action(){ // action... }
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/update.php
update-custom_(action)
wp-admin/update.php 362
do_action( "update-custom_{$action}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores