install_themes_pre_(tab)
Fires before each of the tabs are rendered on the Install Themes page.
The dynamic portion of the hook name, $tab, refers to the current theme installation tab.
Possible hook names include:
- install_themes_pre_block-themes
- install_themes_pre_dashboard
- install_themes_pre_featured
- install_themes_pre_new
- install_themes_pre_search
- install_themes_pre_updated
- install_themes_pre_upload
Usage
add_action( 'install_themes_pre_(tab)', 'wp_kama_install_themes_pre_tab_action' ); /** * Function for `install_themes_pre_(tab)` action-hook. * * @return void */ function wp_kama_install_themes_pre_tab_action(){ // action... }
Changelog
Since 2.8.0 | Introduced. |
Since 6.1.0 | Added the install_themes_pre_block-themes hook name. |
Where the hook is called
In file: /wp-admin/theme-install.php
install_themes_pre_(tab)
wp-admin/theme-install.php 103
do_action( "install_themes_pre_{$tab}" );
Where the hook is used in WordPress
wp-admin/includes/admin-filters.php 118
add_action( 'install_themes_pre_theme-information', 'install_theme_information' );