install_themes_tabs
Filters the tabs shown on the Add Themes screen.
This filter is for backward compatibility only, for the suppression of the upload tab.
Использование
add_filter( 'install_themes_tabs', 'wp_kama_install_themes_tabs_filter' );
/**
* Function for `install_themes_tabs` filter-hook.
*
* @param string[] $tabs Associative array of the tabs shown on the Add Themes screen.
*
* @return string[]
*/
function wp_kama_install_themes_tabs_filter( $tabs ){
// filter...
return $tabs;
}
- $tabs(string[])
- Associative array of the tabs shown on the Add Themes screen.
По умолчанию: 'upload'
Список изменений
| С версии 2.8.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/theme-install.php
install_themes_tabs
wp-admin/theme-install.php 177
$tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) );
wp-admin/includes/class-wp-theme-install-list-table.php 72
$tabs = apply_filters( 'install_themes_tabs', $tabs );