theme_install_actions
Filters the install action links for a theme in the Install Themes list table.
Использование
add_filter( 'theme_install_actions', 'wp_kama_theme_install_actions_filter', 10, 2 );
/**
* Function for `theme_install_actions` filter-hook.
*
* @param string[] $actions An array of theme action links.
* @param stdClass $theme An object that contains theme data returned by the WordPress.org API.
*
* @return string[]
*/
function wp_kama_theme_install_actions_filter( $actions, $theme ){
// filter...
return $actions;
}
- $actions(string[])
- An array of theme action links.
По умолчанию: are links to Install Now, Preview, and Details - $theme(stdClass)
- An object that contains theme data returned by the WordPress.org API.
Список изменений
| С версии 3.4.0 | Введена. |
Где вызывается хук
theme_install_actions
wp-admin/includes/class-wp-theme-install-list-table.php 361
$actions = apply_filters( 'theme_install_actions', $actions, $theme );