theme_install_actions
Filters the install action links for a theme in the Install Themes list table.
Usage
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.
Default: are links to Install Now, Preview, and Details - $theme(stdClass)
- An object that contains theme data returned by the WordPress.org API.
Changelog
Since 3.4.0 | Introduced. |
Where the hook is called
theme_install_actions
wp-admin/includes/class-wp-theme-install-list-table.php 363
$actions = apply_filters( 'theme_install_actions', $actions, $theme );