install_theme_complete_actions
Filters the list of action links available following a single theme installation.
Usage
add_filter( 'install_theme_complete_actions', 'wp_kama_install_theme_complete_actions_filter', 10, 4 ); /** * Function for `install_theme_complete_actions` filter-hook. * * @param string[] $install_actions Array of theme action links. * @param object $api Object containing WordPress.org API theme data. * @param string $stylesheet Theme directory name. * @param WP_Theme $theme_info Theme object. * * @return string[] */ function wp_kama_install_theme_complete_actions_filter( $install_actions, $api, $stylesheet, $theme_info ){ // filter... return $install_actions; }
- $install_actions(string[])
- Array of theme action links.
- $api(object)
- Object containing WordPress.org API theme data.
- $stylesheet(string)
- Theme directory name.
- $theme_info(WP_Theme)
- Theme object.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
install_theme_complete_actions
wp-admin/includes/class-theme-installer-skin.php 190
$install_actions = apply_filters( 'install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info );
Where the hook is used in WordPress
wp-admin/includes/class-theme-upgrader.php 155
add_filter( 'install_theme_complete_actions', array( $this, 'hide_activate_preview_actions' ) );
wp-admin/includes/class-theme-upgrader.php 170
add_filter( 'install_theme_complete_actions', '__return_false', 999 ); // Don't show any actions after installing the theme.
wp-admin/includes/class-theme-upgrader.php 183
add_filter( 'install_theme_complete_actions', array( $this, 'hide_activate_preview_actions' ) );
wp-admin/includes/class-theme-upgrader.php 187
remove_filter( 'install_theme_complete_actions', '__return_false', 999 );