install_theme_overwrite_actions
Filters the list of action links available following a single theme installation failure when overwriting is allowed.
Использование
add_filter( 'install_theme_overwrite_actions', 'wp_kama_install_theme_overwrite_actions_filter', 10, 3 ); /** * Function for `install_theme_overwrite_actions` filter-hook. * * @param string[] $install_actions Array of theme action links. * @param object $api Object containing WordPress.org API theme data. * @param array $new_theme_data Array with uploaded theme data. * * @return string[] */ function wp_kama_install_theme_overwrite_actions_filter( $install_actions, $api, $new_theme_data ){ // filter... return $install_actions; }
- $install_actions(string[])
- Array of theme action links.
- $api(объект)
- Object containing WordPress.org API theme data.
- $new_theme_data(массив)
- Array with uploaded theme data.
Список изменений
С версии 5.5.0 | Введена. |
Где вызывается хук
install_theme_overwrite_actions
wp-admin/includes/class-theme-installer-skin.php 372
$install_actions = apply_filters( 'install_theme_overwrite_actions', $install_actions, $this->api, $new_theme_data );